You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

The Nuget Install Action is used to install one or more NuGet packages into the specified output directory.

Name

A friendly name for this action (will be displayed in the stages area).

Enabled

Determines if this action will be run within the relevant stage.

Package Id / Config file

This is either the package id (as found on NuGet.org, example provided below), or the location of a package.config file.

Output directory

This is the path of the folder to install the package to.

Sources

Optional list of NuGet Feed package sources (the default source location is nuget.org).

Version

Version number of the package to install.  

Exclude version in folder name

By default a NuGet package folder contains the version number of the package (eg (SolutionDir)\packages\packagename.x.x.x\)

Install pre-release packages

NuGet requires permission to be granted to download and install pre-release packages.  Packages which contain the '-Pre' suffix will require this option to be ticked.

Use cache

Look to the local package Cache before going to NuGet or external sources.

Require consent

As of NuGet version 2.0 a privacy-related constraint option for restores from introduced. When ticked NuGet will check to see if package restore consent has been granted before installing package(s). If ticked NuGet will look for the presence of the following within your NuGet.config file (if not present a build error will occur).  

 

<packageRestore>
  <add key="enabled" value="true" />
</packageRestore>

 

For further information on the NuGet require consent feature please see the NuGet documentation 

File Conflict Action

The action to take, when asked to overwrite or ignore existing files referenced by the project. The options are: Overwrite, Ignore, None.

Configuration File

The user specific configuration file (packages.config). If not specified, file %AppData%\NuGet\NuGet.config is used as configuration file.

Enable Package Restore

When ticking this check box adds the relevant system environment variable 'EnableNuGetPackageRestore = true'. This is the equivalent of clicking “Allow NuGet to download missing packages during build' ticked within Visual Studio.

Solution Directory

The relative or absolute directory to use when restoring packages for a solution. This option is not valid when restoring packages for a solution file. In this scenario, $(SolutionDir)\packages is used as the packages directory.

Add environment variables to be used by this action

  • No labels