.NET Standard 项目构建失败并显示无用消息

.NET Standard project build fails with unhelpful message

在尝试构建针对 .NET Standard 1.3 的项目(Xamarin 应用程序使用的 class 库)时,我收到以下消息和构建失败:

Error : Your project is not referencing the ".NETPlatform,Version=v5.0" framework. Add a reference to ".NETPlatform,Version=v5.0" in the "frameworks" section of your project.json, and then re-run NuGet restore.

project.json看起来像这样(我没有编辑它,这是最初为我生成的):

{
  "supports": {},
  "dependencies": {
    "Microsoft.NETCore.Portable.Compatibility": "1.0.1",
    "NETStandard.Library": "1.6.0",
    "Newtonsoft.Json": "9.0.1",
    "NJsonSchema": "6.5.6190.16910"
  },
  "frameworks": {
    "netstandard1.3": {}
  }
}

网上没有关于我如何添加它说要添加的引用的信息,而且它提供的值不能按原样工作。

如何构建这个项目?

更新:

试过这个 https://github.com/dotnet/roslyn/issues/12918 并且错误输出已更新为

Error : Your project is not referencing the     
".NETStandard,Version=v1.3" framework. Add a reference to 
".NETStandard,Version=v1.3" in the "frameworks" section of your 
project.json, and then re-run NuGet restore.

更新:

我已经到了它试图在解决方案中构建另一个项目的地步,并按照

的方式给出了数千个错误

System.Object is not defined or imported

自 VS 2017 发布以来,我已使用新的 csproj 样式将我的项目升级到 .NET Standard。 .NET 似乎放弃了 project.json,所以我要结束这个问题。