0

When I run in local my test "coded UI" from visual studio 2015 enterprise they work correctly, but when I run them from a "release definition" (TFS Version 15.117.26714.0) I get this error:

System.InvalidOperationException: The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' registered in the application config file for the ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded . Make sure that the assembly-qualified name is used and that the assembly is available to the running application.

I do not understand it because I have reviewed the entity framework DLLs and they are in the Build:

  • EntityFramework.dll

  • Oracle.ManagedDataAccess.dll

  • Oracle.ManagedDataAccess.EntityFramework.dll

In local works fine, it only happens in the release definition when you run them on a windows 2012 server.

If the "Coded UI" test does not go to database and therefore has no referenced "Entity Framework" it works correctly in the release definition.

TylerH
  • 20,799
  • 66
  • 75
  • 101
bulbasurmsr
  • 595
  • 1
  • 5
  • 11
  • Seems did not get the referenced packages correctly on build server during the build. Have you restored the packages (Add **Nuget Installer** step to restore )? – Andy Li-MSFT Dec 12 '17 at 08:08
  • Does this answer your question? [How do I solve The Entity Framework provider exception](https://stackoverflow.com/questions/37260473/how-do-i-solve-the-entity-framework-provider-exception) – TylerH Sep 20 '22 at 14:36
  • Does this answer your question? [Entity Framework Provider type could not be loaded?](https://stackoverflow.com/questions/14033193/entity-framework-provider-type-could-not-be-loaded) – TylerH Sep 20 '22 at 14:37

1 Answers1

0

Please try below items to narrow down the issue:

  • Make sure you have installed the Vistual Studio on the build/test machine.
  • Check your release definition, make sure your have added the Nuget Installer step to restore the packages.
  • Uninstall Entity Framework nuget and just reinstall.
  • Check if the EntityFramework.SqlServer.dll was missing for any referenced project. If it is, just add the nuget package to that project.
  • Try installing the latest EntityFramework through Nuget for your projects, then try it again.

Reference this similar thread : How do I solve The Entity Framework provider exception

Andy Li-MSFT
  • 28,712
  • 2
  • 33
  • 55