-
Notifications
You must be signed in to change notification settings - Fork 8
NuGetRestore Task
The NuGetRestore
task restores NuGet packages. Set the Path
property to the path to the solution file, packages.config file, Microsoft Build project, or a project.json file whose packages you want to restore.
By default, NuGetRestore
downloads and used the latest version of NuGet. Set the Version
property to pin this task to a specific version of NuGet.
You can pass custom arguments to NuGet.exe via the Argument
property. Arguments are passed as-is. Argument
should be an array of arguments.
The NuGet executable doesn't report success or failure. If the NuGet restore fails, you'll see compilation errors instead of a problem with this task.
Build:
- NuGetRestore:
Path: MySolution.sln
This demonstrates how to restore the NuGet packages for a Visual Studio solution.
Build:
-NuGetRestore:
Path: MySolution.sln
Version: 4.1.0
This demonstrates how to pin the task to use a specific version of NuGet, in this case, 4.1.0
. Without the Version
attribute, the latest version of NuGet is used.
Build:
-NuGetRestore:
Path: packages.config
Argument:
- "-PackagesDirectory"
- $(WHISKEY_BUILD_ROOT)\packages
This demonstrates how to pass custom arguments to NuGet.exe with the Argument
property. In this example, packages will be put in a packages
directory in the build root (i.e. the same directory as your whiskey.yml
file).
- Common Task Properties
- AppVeyorWaitForBuildJob
- CopyFile
- Delete
- DotNet
- Exec
- File
- GetPowerShellModule
- GitHubRelease
- InstallNodeJs
- LoadTask
- Log
- MergeFile
- MSBuild
- NuGetPack
- NuGetPush
- NuGetRestore
- NUnit2
- NUnit3
- Parallel
- Pester
- Pipeline
- PowerShell
- ProGetUniversalPackage
- PublishBitbucketServerTag
- PublishBuildMasterPackage
- PublishNodeModule
- PublishPowerShellModule
- PublishProGetAsset
- PublishProGetUniversalPackage
- SetVariable
- SetVariableFromPowerShellDataFile
- SetVariableFromXml
- TaskDefaults
- Version
- Zip