Skip to content
BBosman edited this page May 10, 2014 · 1 revision

The NuGet Restore task allows restoring NuGet Packages from solution files or packages.config files.

Example

grunt.initConfig({
    nugetrestore: {
        restore: {
            src: 'tests/packages.config',
            dest: 'packages/'
        }
    }
});

You can find more options on this page.

src

type: string, array | required

Specify input files to restore. Accept globbing patterns

dest

type: string | required

Specify output directory to restore packages to

options

type: object | optional

Additionnal Options

options.source

type: string | optional | default: 'nuget.org or NuGet.config's DefaultPushSource '

Specifies the server URL. If not specified, nuget.org is used unless DefaultPushSource config value is set in the NuGet config file. Starting with NuGet 2.5, if NuGet.exe identifies a UNC/folder source, it will perform the file copy to the source.

options.noCache

type: boolean | optional | default: false

Disable using the machine cache as the first package source.

options.configFile

type: string | optional | default: '%AppData%\NuGet\NuGet.config'

The NuGet configuation file. If not specified, file %AppData%\NuGet\NuGet.config is used as configuration file.

options.requireConsent

type: boolean | optional | default: false

Checks if package restore consent is granted before restoring a package.

options.packagesDirectory

type: string | optional | default: dest

Specifies the packages directory. -OutputDirectory is an alias of this option. Optional since it can be specified by using dest argument.

options.solutionDirectory

type: string | optional

Specifies the solution directory. Not valid when restoring packages for a solution.

options.disableParallelProcessing

type: boolean | optional | default: false

Disable parallel nuget package restores.

Clone this wiki locally