ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded

时间:2021-11-08 23:14:48

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://go.microsoft.com/fwlink/?LinkId=260882 for more information.

  出现问题的原因:缺少dll的引用,在引用EF类库时,如果只引用EntityFramework不引用EntityFramework.SqlServer的话就会遇到这样的错误,所以这个问题的解决方案就是:添加对 EntityFramework.SqlServer.dll 的引用即可