【发布时间】:2018-07-11 01:28:05
【问题描述】:
我想安装 Microsoft.EntityFrameworkCore 及其组件。我正在使用 Visual Studio 2015 和 NuGet 客户端版本以前 3.5.0,现在我按照错误报告的指示从https://www.nuget.org/downloads 下载了 3.6.0-rtm-2511(这是最新的)。我不知道为什么我需要 3.6.0 或更高版本的问题仍然存在。
如何以其他方式更新我的 NuGet 包管理器?
我在“工具”>“扩展和更新”>“更新”>“Visual Studio 库”的更新中找不到 Visual Studio 的 Nuget 包管理器。
我只能在“工具”>“扩展和更新”>“已安装”中看到它,但没有更新,但我注意到“自动更新此扩展”已被选中。
PM 控制台的结果
PM> install-package microsoft.entityframeworkcore.sqlserver
GET https://api.nuget.org/v3/registration3-gz-semver2/microsoft.entityframeworkcore.sqlserver/index.json
OK https://api.nuget.org/v3/registration3-gz-semver2/microsoft.entityframeworkcore.sqlserver/index.json 329ms
Retrieving package 'Microsoft.EntityFrameworkCore.SqlServer 2.1.1' from 'nuget.org'.
Install failed. Rolling back...
Uninstalling NuGet package Microsoft.EntityFrameworkCore.SqlServer.2.1.1.
Executing nuget actions took 162.34 ms
install-package : The 'Microsoft.EntityFrameworkCore.SqlServer 2.1.1' package requires NuGet client version '3.6.0' or above, but the current NuGet
version is '3.6.0-rtm-2511'. To upgrade NuGet, please go to http://docs.nuget.org/consume/installing-nuget
At line:1 char:1
+ install-package microsoft.entityframeworkcore.sqlserver
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
Time Elapsed: 00:00:33.0573364
【问题讨论】:
-
您可以从nuget.org/downloads下载Nuget.Exe最新版本
-
与我提供的链接相同,但我尝试下载并安装,它显示“此扩展已安装到所有适用产品”。其中,它是 3.6.0-rtm-2511。不识别为高于 3.6.0
标签: c# visual-studio nuget