错误的相信信息如下描述:

An exception of type ‘System.InvalidOperationException’ occurred in mscorlib.dll but was not handled in user code
Additional information: 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

查看bin目录下,确实少了DLL文件

解决方法:只添加 EntityFramework.SqlServer.dll 即可

————————————————
版权声明:本文为CSDN博主「微微微微风!」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_39797713/article/details/114015887

相关文章:

  • 2022-12-23
  • 2022-01-01
  • 2021-08-31
  • 2022-12-23
  • 2021-08-03
  • 2022-02-07
  • 2021-11-19
猜你喜欢
  • 2021-12-29
  • 2021-11-11
  • 2022-12-23
  • 2021-10-05
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案