如何修复 'Microsoft.NETCore.App',未找到版本“1.1.2”?

How to fix 'Microsoft.NETCore.App', version '1.1.2' was not found?

我在尝试 运行 单元测试时看到此错误:

Testhost process exited with error: It was not possible to find any compatible framework version The specified framework 'Microsoft.NETCore.App', version '1.1.2' was not found. - Check application dependencies and target a framework version installed at: \ - Alternatively, install the framework version '1.1.2'.

如何解决?

安装 DotNetCore.1.0.5_1.1.2-WindowsHosting 解决了我和同事的问题。

报错告诉你需要下载Microsoft.NETCore.App,版本1.1.2 你可以通过 this link.

安装它

对我来说,解决方案是安装 dotnet core 1.1.2..我必须安装 mac 版本。

https://github.com/dotnet/core/blob/master/release-notes/download-archives/1.1.2-download.md