Nuget 恢复无法使用 nuget 命令任务错误 azure pipeline

问题描述 投票:0回答:1

我正在尝试使用 msbuild 14 构建应用程序,但在使用 nuget Restore 命令时收到此错误。使用过 5.x 和 6.x nuget 版本,但我不知道是什么原因导致的

C:\hostedtoolcache\windows\NuGet .11.5\x64 uget.exe 恢复 D:\s\x\packages.config -VerbosityDetailed -NonInteractive -ConfigFile D:\Nuget empNuGet_17578.config 文件“D:\Nuget empNuGet_17578.config”不存在。

我使用的项目没有 nuget.config 文件

Az pipeline 添加此开关 -ConfigFile D: \Nuget empNuGet_17578.config 本身我与此无关

asp.net azure-pipelines nuget-package-restore
1个回答
0
投票

当您对 nuget 任务使用

restore
命令时,需要使用 Feeds to use(文档此处)。

当源代码中不存在 nuget.config 文件并且未指定

feeds to use
时,我可以与您重现相同的错误。

请勾选选项使用来自 NuGet.org 的包,如下所示,它将检查公共 nuget 包。

© www.soinside.com 2019 - 2024. All rights reserved.