如何解决EntityFramework版本不一致

在这里插入图片描述
代码改过之后,新建解决方案发现EntityFramework版本变的不一致了(以前一直都是6.2.0)

打开对应项目下的packages.config文件,查看,发现<package id="EntityFramework" version="6.1.3" targetFramework="net452" />
手动改过之后,然后Visual Studio中“重新创建解决方案即可”。

注意:如果程序报告如下错误,请参见相关链接

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.

The Entity Framework provider type ‘System.Data.Entity.SqlServer.SqlProviderServices, EntityFramewor

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值