首页 > Windows开发 > 详细

C# MVC EF配置失败

时间:2020-06-30 23:25:47      阅读:82      评论:0      收藏:0      [点我收藏+]

报错信息:

  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.

开始我以为是web.Config配置问题:

connectionStrings如下:

<connectionStrings>
<add name="EFDbcontext" providerName="System.Data.SqlClient" connectionString="Server=(local);Database=ReportServer;Integrated Security=True;"/>
</connectionStrings>

虽然我肉眼凡胎,但是我觉得我还是没错哒。。但是又找不出来。。。

百度了一下, 感谢这位大神,贴上地址

https://www.2cto.com/database/201511/449573.html

我仔细的查看了我主程序中的Bin文件,果然发现缺少了EntityFramework.SqlServer.dll的文件。。。然后我看了他一眼,嗯,可以复制到本地。重新生成解决方案...没有用。。

我默默的直接去把所有缺少的EntityFramework的dll文件和xml文件从这个文件夹复制到另一个文件夹。他果然好了~~~~~~~

 

 

虽年少轻狂,但我有我之梦想~~~~

 

C# MVC EF配置失败

原文:https://www.cnblogs.com/ogog/p/13216287.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!