Compartir vía


NuGetToolInstaller@0 - NuGet tool installer v0 task

Use this task to find, download, and cache a specified version of NuGet and add it to the PATH. For information on the tools cache, see the azure-pipelines-tool-lib repo.

Inputs

versionSpec - Version of NuGet.exe to install
string. Required. Default value: 4.3.0.

A version or version range that specifies the NuGet version to make available on the path. Use x as a wildcard. See the list of available NuGet versions.

If you want to match a pre-release version, the specification must contain a major, minor, patch, and pre-release version from the list above. If a version isn't specified, then one will be chosen automatically.

Examples: 4.x, 3.3.x, 2.8.6, >=4.0.0-0.


checkLatest - Always download the latest matching version
boolean. Default value: false.

When this boolean is set to true, the task always checks for and downloads the latest available version of NuGet.exe that satisfies the version spec. This option will also always incur download time, even if the selected version of NuGet is already cached.

Enabling this option could cause unexpected build breaks when a new version of NuGet is released.

Tip

If you're using the Microsoft-hosted agents, you should leave this set to false. Microsoft updates the Microsoft-hosted agents on a regular basis, but they're often slightly behind the latest version. Enabling this parameter could result in your build spending a lot of time updating to a newer minor version.


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 Running this task satisfies the following demands for any subsequent tasks in the same job: NuGet
Command restrictions Any
Settable variables Any
Agent version 2.115.0 or greater
Task category Tool