NuGet 错误。 "Package restore failedd.Rolling back changes for ...",无论我尝试安装什么包

NuGet error. "Package restore failedd.Rolling back changes for ...", no matter what package I try to install

我的 NuGet 有问题,我尝试了所有方法,但根本行不通。

每当我创建一个新项目时,它都不起作用,我无法安装、更新、删除任何东西。我把 Nuget.config 文件留在这里,也许我能得到一些帮助...

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <activePackageSource>
   <add key="nuget.org" value="https://www.nuget.org/api/v2/" />
  </activePackageSource>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json"     protocolVersion="3" />
    <add key="telerik.com" value="https://nuget.telerik.com/nuget" />
  </packageSources>
</configuration>

NuGet error. “Package restore failedd.Rolling back changes for …”, no matter what package I try to install

如果我的理解是正确的,现在您不能再将包 Microsoft.AspNetCore.NodeServices 安装到您的项目中。我说得对吗?

如果是,你应该注意到软件包 Microsoft.AspNetCore.NodeServices 的作者已于 2017 年 8 月 12 日发布了新版本 2.0 (8 /12/2017)(几天前),它支持:netstandard2.0

根据.NET平台支持情况,.NET Core有1.0版和2.0版,1.0版对应.NET Standard 1.0到1.6,2.0版对应.NET Standard 2.0.所以安装.netstandard 2.0包到.net core 1.1,会报错“Package Microsoft.AspNetCore.NodeServices 2.0.0 is not compatible with netcoreapp1.1

要解决此问题,您可以安装版本为 1.1.1 的软件包或将 .net 核心更新到 2.0:

我把那个版本为 1.1.1 的包安装到 .net core 1.1 上,它工作正常。

希望对您有所帮助。