【发布时间】:2020-10-05 01:01:31
【问题描述】:
我正在使用 TFS 2017 和 NuGet Installer - 0 任务在构建定义中进行 NuGet 还原,但出现错误无法找到版本。
它使用下面的命令来恢复包
D:\agent\_work\_tasks\NuGetInstaller_333b11bd-d341-40d9-afcf-b32d5ce6f23b\0.2.31\node_modules\nuget-task-common\NuGet\3.3.0\NuGet.exe restore -NonInteractive D:\agent\_work\42\s\xyz\xyz.sln -Verbosity Detailed
Unable to find version '3.2.7' of package 'Microsoft.AspNet.WebPages'.
2020-06-15T14:50:36.6499535Z Unable to find version '5.2.7' of package 'Microsoft.AspNet.WebApi.WebHost'.
2020-06-15T14:50:36.6499535Z Unable to find version '5.2.7' of package 'Microsoft.AspNet.WebApi.Core'.
2020-06-15T14:50:36.6499535Z Unable to find version '5.2.7' of package 'Microsoft.AspNet.WebApi.Client'.
2020-06-15T14:50:36.6499535Z Unable to find version '5.2.7' of package 'Microsoft.AspNet.Mvc'.
但是当我在代理上手动运行上述命令时,它工作正常,还尝试更新 NuGet 任务版本。
【问题讨论】:
-
嗨@Naveen,您是否尝试在 nuget 任务中勾选 include nuget.org 搜索。我不确定确切的名称,但应该有一个检查选项,以便在 nuget.org 中查看
-
嗨@Etienne 谢谢我已经尝试过这个解决方案,它工作正常。
标签: tfs nuget tfsbuild nuget-package-restore build-agent