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

时间:2023-12-30 13:16:56

今天试着学习了Entity Frame Work遇到的问题是

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.

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

配置文件如下:

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

解决方法:

1.右键解决方案,选择Manage NuGet Packages for Solution...

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

2.选择项目重新安装EntityFrameWork

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

参考网址:http://*.com/questions/21641435/error-no-entity-framework-provider-found-for-the-ado-net-provider-with-invarian

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

如果还有问题:

Entity Framework The underlying provider failed on Open

可以试试:http://*.com/questions/18271301/entity-framework-the-underlying-provider-failed-on-open

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

检测数据库连接字符串是否有问题!