Редактиране

Споделяне чрез


NuGetInstaller@0 - NuGet Installer v0 task

Installs or restores missing NuGet packages.

Important

This task is deprecated. Builds that use it will break on 11-27-2023. Please switch to using NuGetCommand@2's restore option as soon as possible. For more information, see Migrate from NuGetInstaller@0 or NuGetRestore@1.

Installs or restores missing NuGet packages.

This task is deprecated. Use the NuGetCommand@2's restore option.

Installs or restores missing NuGet packages. Use NuGetAuthenticate@0 task for latest capabilities.

Installs or restores missing NuGet packages.

Syntax

# 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.
# NuGet Installer v0
# Installs or restores missing NuGet packages.
- 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.

Inputs

solution - Path to solution or packages.config
string. Required. Default value: **/*.sln.

The path to the Visual Studio solution file or NuGet packages.config.


nugetConfigPath - Path to NuGet.config
string.

Equivalent to the -ConfigFile NuGet.exe command line argument.


restoreMode - Installation type
string. Required. Allowed values: restore, install. Default value: restore.

Restore will restore the packages a solution depends upon, and is generally what you want.

Install will install packages from a packages.config file. Use this option if you want to install a standalone tool package.


noCache - Disable local cache
boolean. Default value: false.

Equivalent to the -NoCache NuGet.exe command line argument.


nuGetRestoreArgs - NuGet arguments
string.

Additional arguments passed to NuGet.exe restore or install. More Information.


verbosity - Verbosity
string. Allowed values: -, Quiet, Normal, Detailed. Default value: -.

NuGet's verbosity level.


nuGetVersion - NuGet Version
string. Required. Allowed values: 3.3.0, 3.5.0.1829 (3.5.0), 4.0.0.2283 (4.0.0), custom. Default value: 3.3.0.

The version of NuGet to use, or external version.


nuGetPath - Path to NuGet.exe
string.

Optionally supply the path to NuGet.exe. Will override version selection.


Task control options

All tasks have control options in addition to their task inputs. For more information, see Control options and common task properties.

Output variables

None.

Requirements

Requirement Description
Pipeline types YAML, Classic build, Classic release
Runs on Agent, DeploymentGroup
Demands None
Capabilities This task does not satisfy any demands for subsequent tasks in the job.
Command restrictions Any
Settable variables Any
Agent version 2.115.0 or greater
Task category Package
Requirement Description
Pipeline types YAML, Classic build, Classic release
Runs on Agent, DeploymentGroup
Demands None
Capabilities This task does not satisfy any demands for subsequent tasks in the job.
Command restrictions Any
Settable variables Any
Agent version 1.83.0 or greater
Task category Package