【发布时间】:2020-01-18 13:54:00
【问题描述】:
我在 TFS 2017 构建过程中使用 NuGet Packager 任务为类库创建 NuGet 包。我收到错误消息:
[错误]“System.Runtime”已经为“Microsoft.NETCore.Platforms”定义了一个依赖项。 [错误]System.Exception:从工具 NuGet.exe 返回的意外退出代码 1
我设置了以下任务参数:
Path to csproj or nuspec file(s) to pack: .\xxx\xxx.csproj
Package Folder: ./xxx/bin/Release
Include referenced projects: Checked
Automatic package versioning: Use the build number
Configuration to Package: $(BuildConfiguration)
我正在使用相同的 TFS 任务为另一个类库创建另一个 NuGet 包,一切正常。
我尝试了以下 stackoverflow 问题提供的解决方案,但没有任何效果。
NuGet: 'X' already has a dependency defined for 'Y'
知道如何解决这个错误吗?
【问题讨论】: