Quantcast
Channel: Entity Framework
Viewing all articles
Browse latest Browse all 10318

Commented Unassigned: [Investigate EF6] EF6 RC1 usage in the context of unit tests [1590]

$
0
0
While creating a performance suite I came across an issue with EF6 where I was getting

"The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' for the 'System.Data.SqlClient' ADO.NET provider could not be loaded" under some circustances.

The test in question queries a Code-First EF database to retrieve some test data on the ClassInitialize method. When I ran this test using the VS test runner and the local built in controller, everything was OK.

When I ran the same test, using the Resharper test runner, I would get the could not be loaded exception. But this is just a minor tooling issue.

However, when I try to run the same test using a test controller that is using test agents, I get the could not load exception again, so in the context of a Load test, that test wouldn't run.

When I downgraded to EF5, everything ran as expected, even Resharper test runner firing up the test ran fine.
Comments: Thanks for the quick reply. Just wanted to confirm that adding a code reference to something on the providers assembly fixed the problem both for R# and for remote execution under test agents. For the remote execution scenario, like you mentioned, adding EntityFramework.SqlServer assembly to the deployment options in the testsettings file will also fix the problem. ![Image](http://djfr.files.wordpress.com/2013/08/ef1.png) Thanks for all the work in making EF great and open source! I have learned a lot just by looking around in your codebase.

Viewing all articles
Browse latest Browse all 10318

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>