gpt4 book ai didi

.net - Visual Studio Team Services 构建包还原失败,project.json netstandard1.0 目标

转载 作者:行者123 更新时间:2023-12-02 13:34:29 25 4
gpt4 key购买 nike

我最近使用 project.json 和新的 netstandard1.0 框架名称更新了我的可移植类库以针对 .NET Core。我的理解是 Nuget 3.4 现在支持这一点。我的项目有以下project.json:

{
"supports": {},
"dependencies": {
"Microsoft.NETCore.Portable.Compatibility": "1.0.1",
"NETStandard.Library": "1.6.0"
},
"frameworks": {
"netstandard1.0": {}
}
}

这在 Visual Studio 2015 Update 3 中构建得非常好。

但是,当使用 VSTS(以前是 Visual Studio Online)构建时,现在在包还原步骤中出现以下错误:

The project 'MyProject' does not specify any target frameworks in 'C:\a\1\s\MyProject\project.json'.

它显示正在执行的命令是:

NuGet.exe restore "C:\a\1\s\Build.sln"  -NonInteractive -configfile "C:\a\1\NuGet\newNuGet.config"

这是由于对解决方案执行恢复造成的吗?或者也许 VSTS 构建任务尚未使用 Nuget 3.4?

最佳答案

您可以展开“高级”部分,然后选择最新版本的 Nuget。截至 2016 年 10 月,这是 Nuget 3.5 rc2

关于.net - Visual Studio Team Services 构建包还原失败,project.json netstandard1.0 目标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38132889/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com