System.InvalidOperationException: No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient'.

by sunil ravulapalli /12. November 2013 09:17 /entityframework /Comments (0)

I got this error when using Entity framework 6.0 from my MSTest project:

System.InvalidOperationException: No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient'. Make sure the provider is registered in the 'entityFramework' section of the application config file. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information.

To fix this put

var _temp = System.Data.Entity.SqlServer.SqlProviderServices.Instance;

anywhere in your test project. I put it in a constructor.

Reference:

http://entityframework.codeplex.com/workitem/1590

blog comments powered by Disqus