的版本运行此命令的NuGet无法找到包
nuget.exe restore .\MySolution.sln
给出了这样的错误:
Unable to find version '1.0.0' of package 'Microsoft.Net.Compilers'.
所在的包以前已安装并恢复
,但莫名其妙地成为腐败。
的版本运行此命令的NuGet无法找到包
nuget.exe restore .\MySolution.sln
给出了这样的错误:
Unable to find version '1.0.0' of package 'Microsoft.Net.Compilers'.
所在的包以前已安装并恢复
,但莫名其妙地成为腐败。
原来只需通过
nuget.exe update -self
更新的NuGet版本更新2.8.0从3.4.4到足够大,而且包现在恢复正常。
我有同样的问题,但我需要继续使用nuget.exe
2.8,因为无法升级安装在我们的构建服务器上的.NET Framework版本(2.8是仍然适用于.NET 4.0的最新版本) 。
原因竟然是nuget.config
只指向v3 API。解决方案是添加到v2 API中。例如。
<configuration>
<activePackageSource>
<add key="All" value="(Aggregate source)" />
</activePackageSource>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="nuget v2" value="https://www.nuget.org/api/v2" />
</packageSources>
</configuration>
在我们的例子中,我们评级从3.3.x在VS中的NuGet扩展到3.4.4。
您可以在工具菜单 - >扩展和更新 - >更新 - > Visual Studio库中找到更新。
我使用的是自动化的Mac版本,就像你不能升级'nuget'一样修复了我的错误。谢谢! – user1