无法从EF Core 1.1.2升级到2.0.0版 [英] can not upgrade from EF Core 1.1.2 to version 2.0.0

查看:81
本文介绍了无法从EF Core 1.1.2升级到2.0.0版的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所有,最近,我开始着手使用EF Core 1.1.2的项目。我看到了2.0的发布位置,因为尝试将EF core添加到项目时开始出错。
我无法更新现有项目,创建了一个全新的控制台项目。将.Net框架设置为4.6.1,仍然没有运气。我总是收到以下消息。有人遇到过这个问题吗?预先感谢

All, I recently started working on a project that uses EF Core 1.1.2. I saw where 2.0 was released because I started getting errors when I tried to add EF core to a project. I couldn't update the existing project, I created a brand new console project. Set the .Net framework to 4.6.1 and still had no luck. I always get the following message. Has anyone ran into this issue? thanks in advance


Install-Package:无法安装软件包 Microsoft.EntityFrameworkCore.SqlServer 2.0.0。您试图
将此软件包安装到以'.NETFramework,Version = v4.6.1'为目标的项目中,但是该软件包不包含
与该框架兼容的任何程序集引用或内容文件。

Install-Package : Could not install package 'Microsoft.EntityFrameworkCore.SqlServer 2.0.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.6.1', but the package does not contain any assembly references or content files that are compatible with that framework.


推荐答案

EF Core 2.0版本已经正式宣布,并且该文档为(部分)更新

EF Core 2.0 release has been officially announced and the documentation is (partially) updated.

当然,它不仅仅是NET Core。但是,针对Full .NET Framework的实际前提条件如下:

Of course it's not NET Core only. But the actual prerequisites for targeting Full .NET Framework are as follows:

(1)针对.NET Framework 4.6.1及更高版本的项目。

(1) Project targeting .NET Framework 4.6.1 and above.

(2)已安装(重要!)15.3.0更新(也刚刚发布)的Visual Studio 2017

(2) Visual Studio 2017 with (important!) 15.3.0 update (also just released) installed

在更新VS之前,我遇到了相同的错误。更新后,错误消失了,EF 2.0软件包已成功安装。

Before updating the VS I was getting the same error. After updating the error is gone and EF 2.0 package is successfully installed.

这篇关于无法从EF Core 1.1.2升级到2.0.0版的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆