visual studio 2017 安装后 visual studio 2015 的包恢复失败

package restore failed in visual studio 2015 after visual studio 2017 installation

我刚刚在我的系统上安装了 visual studio 2017 企业版。但是现在,如果我尝试使用 visual studio 2015 创建任何项目,我会在参考部分看到这样的错误 http://prntscr.com/et17ls

和输出 window 显示此 http://prntscr.com/et17qt

我看到 gloabl.json 是这样 http://prntscr.com/et189h

{
  "projects": [ "src", "test" ],
  "sdk": {
    "version": "1.0.0-preview2-003121"
  }
}

请提出解决方法。

在我的控制面板中,我看到了这个 http://prntscr.com/et18ws

我假设您在谈论 asp.net 核心。

VS2015和VS2017不一样。 VS2015 使用 project.json 而 VS2017 使用 *.csproj

但是你可以转换它:

https://docs.microsoft.com/en-au/dotnet/articles/core/tools/project-json-to-csproj

对于我自己,我刚刚在 VS2017 中重新创建: https://github.com/Longfld/ASPNETCoreAngular4

我找到了解决方案。我需要更新 visual studio 2015 的工具预览。这是我写的详细内容 https://asiftech.wordpress.com/2017/04/06/package-restore-failed-in-visual-studio-2015-after-visual-studio-2017-installation/