Skip to content

Files

21 lines (13 loc) · 1.01 KB
·

restore-nuget-exe-cli.md

File metadata and controls

21 lines (13 loc) · 1.01 KB
·

The NuGet CLI restore command downloads and installs any missing packages. The command works on projects that use either PackageReference or packages.config for package references.

Like install, the restore command only adds packages to disk, but doesn't modify the project file or packages.config. To add project dependencies, use the Visual Studio Package Manager UI or Console.

To restore packages, run the following command:

nuget restore <projectPath>

The restore command uses a solution file or a package.config file in the specified project path.

For example, to restore all packages for MySolution.sln in the current directory, run:

nuget restore MySolution.sln

Note

For non-SDK-style projects that use PackageReference, use msbuild -t:restore to restore packages instead.