NuGetInstaller@0 - NuGet Installer v0 任务

安装或还原缺少 NuGet 包。

重要

此任务已弃用。 使用它的内部版本将在 2023 年 11 月 27 日中断。 请尽快切换到使用 NuGetCommand@2restore 选项。 有关详细信息,请参阅 从NuGetInstaller@0或NuGetRestore@1迁移。

安装或还原缺少 NuGet 包。

此任务已弃用。 使用 NuGetCommand@2restore 选项。

安装或还原缺少 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.configsolution - 路径
string。 必填。 默认值:**/*.sln

Visual Studio 解决方案文件或 NuGet packages.config的路径。


nugetConfigPath - NuGet.config 的路径
string

等效于 -ConfigFile NuGet.exe 命令行参数。


restoreMode - 安装类型
string。 必填。 允许的值:restoreinstall。 默认值:restore

还原将还原解决方案所依赖的包,通常是所需的。

安装将从 packages.config 文件安装包。 如果要安装独立工具包,请使用此选项。


noCache - 禁用本地缓存
boolean。 默认值:false

等效于 -NoCache NuGet.exe 命令行参数。


nuGetRestoreArgs - NuGet 参数
string

传递给 NuGet.exe 还原或安装的其他参数。 更多信息.


verbosity - 详细程度
string。 允许的值:-QuietNormalDetailed。 默认值:-

NuGet 的详细级别。


nuGetVersion - NuGet 版本
string。 必填。 允许的值:3.3.03.5.0.1829(3.5.0)、4.0.0.2283(4.0.0),custom。 默认值:3.3.0

要使用的 NuGet 版本或外部版本。


nuGetPath - NuGet.exe 的路径
string

(可选)提供 NuGet.exe的路径。 将替代版本选择。


任务控制选项

除任务输入之外,所有任务都具有控制选项。 有关详细信息,请参阅 控件选项和常见任务属性

输出变量

没有。

要求

要求 说明
管道类型 YAML,经典版本,经典版本
运行时间 代理,DeploymentGroup
需求 没有
功能 此任务不满足作业中后续任务的任何要求。
命令限制 任何
Settable 变量 任何
代理版本 2.115.0 或更高版本
任务类别 封装件