Entity Framework发布到IIS报错

参考资料:https://www.cnblogs.com/mrma/p/5404584.html

报错信息

  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.

错误原因

  项目发布后 EntityFramework.SqlServer.dll文件和 EntityFramework.SqlServer.xml文件没有生成到发布文件夹。

解决方案

  •   可以按照参考链接里面的方法尝试。
  •   我按照链接里面的方式试了不怎么管用,就自己从插件文件夹里面或者其他项目的bin文件夹(需要其他项目先执行生成操作)拷贝到报错项目的发布文件夹
posted @ 2020-04-24 16:56  大稳·杨  阅读(540)  评论(0编辑  收藏  举报