Skip to content

NuGet Package Restore

Luca Sgroi edited this page Mar 31, 2017 · 5 revisions

Referenced NuGet packages are restored in two steps: the build runner will automatically restore all packages marked as development-only-dependency; the remainder should be restored within the build script in the form of task or command.

Example: The packages are restored as part of the default task.

Import-Task Restore-NuGetPackages, Clean, Build

# Synopsis: Default task
Task . Restore-NuGetPackages, Clean, Build

Example: The packages are restored before any task.

Import-Task Clean, Build

Enter-Build {
    Restore-NuGetPackages
}

# Synopsis: Default task
Task . Clean, Build

Pask is a build tool and therefore only requires development dependencies. The full set of referenced packages will be required by some tasks, but not strictly all.