The \f[C]dotnet\ restore\f[] command uses NuGet to restore dependencies as well as project\-specific tools that are specified in the project file.
By default, the restoration of dependencies and tools are performed in parallel.
.PP
.PP
In order to restore the dependencies, NuGet needs the feeds where the packages are located.
Feeds are usually provided via the \f[I]NuGet.config\f[] configuration file.
A default configuration file is provided when the CLI tools are installed.
You specify additional feeds by creating your own \f[I]NuGet.config\f[] file in the project directory.
You also specify additional feeds per invocation at a command prompt.
.PP
For dependencies, you specify where the restored packages are placed during the restore operation using the \f[C]\-\-packages\f[] argument.
If not specified, the default NuGet package cache is used, which is found in the \f[C]\&.nuget/packages\f[] directory in the user's home directory on all operating systems (for example, \f[I]/home/user1\f[] on Linux or \f[I]C:1\f[] on Windows).
.PP
For project\-specific tooling, \f[C]dotnet\ restore\f[] first restores the package in which the tool is packed, and then proceeds to restore the tool's dependencies as specified in its project file.
.PP
The behavior of the \f[C]dotnet\ restore\f[] command is affected by some of the settings in the \f[I]Nuget.Config\f[] file, if present.
For example, setting the \f[C]globalPackagesFolder\f[] in \f[I]NuGet.Config\f[] places the restored NuGet packages in the specified folder.
This is an alternative to specifying the \f[C]\-\-packages\f[] option on the \f[C]dotnet\ restore\f[] command.
For more information, see the NuGet.Config reference.
.SSImplicit\f[C]dotnet\ restore\f[]
.PP
Starting with .NET Core 2.0, \f[C]dotnet\ restore\f[] is run implicitly if necessary when you issue the following commands:
.IP\[bu]2
\f[C]dotnet\ new\f[]
.IP\[bu]2
\f[C]dotnet\ build\f[]
.IP\[bu]2
\f[C]dotnet\ run\f[]
.IP\[bu]2
\f[C]dotnet\ test\f[]
.IP\[bu]2
\f[C]dotnet\ publish\f[]
.IP\[bu]2
\f[C]dotnet\ pack\f[]
.PP
In most cases, you no longer need to explicitly use the \f[C]dotnet\ restore\f[] command.
.PP
In some cases, it is inconvenient for \f[C]dotnet\ restore\f[] to run implicitly.
For example, some automated systems, such as build systems, need to call \f[C]dotnet\ restore\f[] explicitly to control when the restore occurs so that they can control network usage.
To prevent \f[C]dotnet\ restore\f[] from running implicitly, you can use the \f[C]\-\-no\-restore\f[] switch with any of these commands to disable implicit restore.
.SSArguments
.PP
\f[C]ROOT\f[]
.PP
Optional path to the project file to restore.
.SHOPTIONS
.SS.NETCore2.x
.PP
\f[C]\-\-configfile\ <FILE>\f[]
.PP
The NuGet configuration file (\f[I]NuGet.config\f[]) to use for the restore operation.