安装或还原缺少 NuGet 包。
重要
此任务已弃用。 使用它的内部版本将在 2023 年 11 月 27 日中断。 请尽快切换到使用 NuGetCommand@2的 restore
选项。 有关详细信息,请参阅 从NuGetInstaller@0或NuGetRestore@1迁移。
安装或还原缺少 NuGet 包。
此任务已弃用。 使用 NuGetCommand@2的 restore
选项。
安装或还原缺少 NuGet 包。 使用NuGetAuthenticate@0任务获取最新功能。
语法
# NuGet Installer v0
# Installs or restores missing NuGet packages. Use NuGetAuthenticate@0 task for latest capabilities.
- task: NuGetInstaller@0
inputs:
solution: '**/*.sln' # string. Required. Path to solution or packages.config. Default: **/*.sln.
#nugetConfigPath: # string. Path to NuGet.config.
restoreMode: 'restore' # 'restore' | 'install'. Required. Installation type. Default: restore.
#noCache: false # boolean. Disable local cache. Default: false.
#nuGetRestoreArgs: # string. NuGet arguments.
# Advanced
#verbosity: '-' # '-' | 'Quiet' | 'Normal' | 'Detailed'. Verbosity. Default: -.
nuGetVersion: '3.3.0' # '3.3.0' | '3.5.0.1829' | '4.0.0.2283' | 'custom'. Required. NuGet Version. Default: 3.3.0.
#nuGetPath: # string. Path to NuGet.exe.
输入
解决方案或 packages.config的 solution
- 路径
string
。 必填。 默认值:**/*.sln
。
Visual Studio 解决方案文件或 NuGet packages.config的路径。
nugetConfigPath
-
NuGet.config 的路径
string
。
等效于 -ConfigFile NuGet.exe 命令行参数。
restoreMode
-
安装类型
string
。 必填。 允许的值:restore
、install
。 默认值:restore
。
还原将还原解决方案所依赖的包,通常是所需的。
安装将从 packages.config 文件安装包。 如果要安装独立工具包,请使用此选项。
noCache
-
禁用本地缓存
boolean
。 默认值:false
。
等效于 -NoCache NuGet.exe 命令行参数。
verbosity
-
详细程度
string
。 允许的值:-
、Quiet
、Normal
、Detailed
。 默认值:-
。
NuGet 的详细级别。
nuGetVersion
-
NuGet 版本
string
。 必填。 允许的值:3.3.0
、3.5.0.1829
(3.5.0)、4.0.0.2283
(4.0.0),custom
。 默认值:3.3.0
。
要使用的 NuGet 版本或外部版本。
nuGetPath
-
NuGet.exe 的路径
string
。
(可选)提供 NuGet.exe的路径。 将替代版本选择。
任务控制选项
除任务输入之外,所有任务都具有控制选项。 有关详细信息,请参阅 控件选项和常见任务属性。
输出变量
没有。