小编pia*_*njh的帖子

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

我最近使用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": {}
  }
}
Run Code Online (Sandbox Code Playgroud)

这从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'.
Run Code Online (Sandbox Code Playgroud)

它显示执行的命令是:

NuGet.exe restore "C:\a\1\s\Build.sln"  -NonInteractive -configfile "C:\a\1\NuGet\newNuGet.config"
Run Code Online (Sandbox Code Playgroud)

这是由于对解决方案执行恢复吗?或者VSTS Build任务还没有使用Nuget 3.4?

.net nuget-package-restore .net-core azure-devops azure-pipelines

5
推荐指数
1
解决办法
775
查看次数