NuGet@0已弃用。 请改用 NuGetCommand 任务。 它适用于新的工具安装程序框架,因此,无需等待任务更新即可轻松使用新版本的 NuGet,从而更好地支持此组织/集合外部经过身份验证的源,并默认使用 NuGet 4。
语法
# NuGet command v0
# Deprecated: use the “NuGet” task instead. It works with the new Tool Installer framework so you can easily use new versions of NuGet without waiting for a task update, provides better support for authenticated feeds outside this organization/collection, and uses NuGet 4 by default.
- task: NuGet@0
inputs:
command: # string. Required. Command.
#arguments: # string. Arguments.
输入
command
-
命令
string
。 必填。
指定要运行的 NuGet 命令。 将值设置为 Custom
以添加参数或使用其他命令。 允许的值为 restore
、pack
、custom
和 push
。
arguments
-
参数
string
。
指定要传递给执行 NuGet.exe
的命令和参数。 如果使用 NuGet 3.5 或更高版本,则针对 Project Collection Build Service 有权访问的任何源 list
、restore
和 publish
等经过身份验证的命令将自动进行身份验证。
任务控制选项
除任务输入之外,所有任务都具有控制选项。 有关详细信息,请参阅 控件选项和常见任务属性。
输出变量
没有。