31. October 2013 09:49
/
victor
/
Coding
/
Comments (0)
I am using Effort to perform my data access layer unit test. It worked fine until I upgraded my entity framework to version 6. Then I got this wired exception:
"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 googled this exception. A lot of people thought this was caused by the EF dlls were not deployed at part of the test. But this didn't resolve the issue for me. So I decided to comment out the provider section in app.config for the unit test project and try my luck.
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
Guess what, everything is back to normal agin. Sounds stupid, but it works:D
6a820a7f-0ed3-44b4-b569-b852cfe0d75a|0|.0|27604f05-86ad-47ef-9e05-950bb762570c
Tags :