mercredi 28 octobre 2015

Entity Framework Provider Type could not be loaded when running unit test, debugs fine

I have a .NET 4.5.2 unit test project in VS2013 version 12.0.31101.00 Update 4. EntityFramework 6.1.3 is installed in the project via NuGet. The same version of EntityFramework is in all projects in the solution that use EntityFramework.

When I run a particular MS-Test unit test, I get a System.InvalidOperationException with the message "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. See http://ift.tt/19X4Ntk for more information".

However, when I debug that test, the test runs through all the way and passes. What gives?

Aucun commentaire:

Enregistrer un commentaire