Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The NuGet Restore action is used to populate a set of NuGet packages on the build server (usually prior to these packages being built into your project).

NuGet Restore

Image RemovedImage Added

Name

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

...

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

Packages.config or Solution File

The location of your .sln or packages.conf file within your source control.

Sources

An optional list of NuGet Feed package sources (the default source location is nuget.org). [-Source]

Specify configuration file

Shows a field for specifying the path to the configuration file. If not ticked, no -ConfigFile parameter is set and NuGet will automatically attempt to detect the configuration file. [-ConfigFile]

Configuration File

...

Project Path

The path to a solution, packages.config or MSBuild project file.

Packages Directory

Specify the folder in which the packages are installed. [-PackagesDirectory]

Solution Directory

Specify the solution directory. Not valid when restoring packages for a solution file (specified as the Project Path). [-SolutionDirectory]

Command Line Version

Select the version of the NuGet command line that is installed on the agent. Some other settings and options may be unavailable depending which the command line version is selected.

Using

The Using drop down is populated with any property collector whose namespace matches the pattern defined by the NuGet Restore action. The pattern for this action is ^NuGet.*

...

Alternatively, you can select the Custom option from the Using drop down list and specify a path in the resulting input field that will be displayed. Please read Why it's a good idea to use a property collector before using this option.


Download

Image Added

Sources

An optional list of NuGet Feed package sources (the default source location is nuget.org). [-Source]

Fallback Sources

A list of package sources to use as fallbacks in case the package isn't found in any of the primary or default sources.

...

One source per line. [-FallbackSource]

Package Save Mode

The type of files to save after package installation. [-PackageSaveMode]

Use cache

Settings

Image Removed

...

If this is ticked, the local package Cache is checked first before going to NuGet or external sources. [-NoCache]

Download directly without populating any caches with metadata or binaries

Downloads packages directly without populating caches with any binaries or metadata. [-DirectDownload]


Build

Image Added

MSBuild Version

The version of MSBuild to use with this command. Leave blank to default to the MSBuild executable in your path, or otherwise the highest installed version of MSBuild. [-MSBuildVersion].

MSBuild Path

The path to the MSBuild executable to use with the command. This takes precedence over the MSBuild Version. [-MSBuildPath].

Recursive

Restores all references projects for UWP and .NET Core projects. Does not apply to projects using packages.config.

Project To Project Timeout

Specifies the timeout for resolving project-to-project references in seconds. Leave blank or zero to use default. [-Project2ProjectTimeOut]


Settings

Image Added

Configuration File

Location of the nuget.config file within your source control.

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).  [-RequireConsent]

...

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

Packages Directory

The relative or absolute directory that NuGet will look to resolve packages.  This can also be specified within the NuGet configuration file. [-PackagesDirectory]

Solution Directory

The relative or absolute directory to use when restoring packages for a solution. <solutionDirectory>\packages is used as the packages directory.  This option is not valid when restoring packages for a solution file in this scenario $(SolutionDir)\packages is used as the packages directory. [-SolutionDirectory]

Enable Parallel Processing

.

Disable Parallel Processing

Tick to disable installing multiple packages in parallel. [-DisableParallelProcessing]

Force

Force all dependencies to be resolved even if the last restore was successful. This is equivalent to deleting project.assets.json. Does not apply to projects using packages.config. [-ForceBy Default NuGet will download and install dependency chains in Parallel.  To disable this feature tick off this option. [-DisableParallelProcessing]

Enable Package Restore

When ticking this check box checkbox, it 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.


Options

Image RemovedImage Added

Log standard output

...

If this is ticked, any warnings logged will not mark the action with a warning status.


Environment

Image RemovedImage Added

Environment Variables

...