Dag*_*oms 5 .net xamarin.android xamarin asp.net-core .net-standard
在尝试构建面向.NET Standard 1.3(由Xamarin应用程序使用的类库)的项目时,我收到以下消息和失败的构建:
错误:您的项目未引用".NETPlatform,Version = v5.0"框架.在project.json的"frameworks"部分中添加对".NETPlatform,Version = v5.0"的引用,然后重新运行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": {}
}
}
Run Code Online (Sandbox Code Playgroud)
在线没有关于如何添加它要添加的引用的信息,并且它提供的值不能正常工作.
如何构建此项目?
更新:
试过这个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.
Run Code Online (Sandbox Code Playgroud)
更新:
我已经明白,它试图在解决方案中构建另一个项目,并提供数千个错误
未定义或导入System.Object
自 VS 2017 发布以来,我已使用新的 csproj 样式将我的项目升级到 .NET Standard。看来.NET 删除了project.json,所以我要结束这个问题。
| 归档时间: |
|
| 查看次数: |
338 次 |
| 最近记录: |