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.
Please try below items to narrow down the issue:
EntityFramework.SqlServer.dll
was missing for any
referenced project. If it is, just add the nuget package to that
project.Reference this similar thread : How do I solve The Entity Framework provider exception