Provided by: dotnet-host-9.0_9.0.7-0ubuntu1~25.04.1_amd64 

dotnet workload restore
This article applies to: ✔️ .NET 6 SDK and later versions
NAME
dotnet-workload-restore - Installs workloads needed for a project or a solution.
SYNOPSIS
dotnet workload restore [<PROJECT | SOLUTION>]
[--configfile <FILE>] [--disable-parallel]
[--ignore-failed-sources] [--include-previews] [--interactive]
[--no-cache] [--skip-manifest-update] [-s|--source <SOURCE>]
[--temp-dir <PATH>] [-v|--verbosity <LEVEL>] [--version <VERSION>]
dotnet workload restore -?|-h|--help
DESCRIPTION
The dotnet workload restore command analyzes a project or solution to determine which workloads it needs,
then installs any workloads that are missing.
For more information about the dotnet workload commands, see the dotnet workload install command.
ARGUMENTS
• PROJECT | SOLUTION
The project or solution file to install workloads for. If a file is not specified, the command search‐
es the current directory for one.
OPTIONS
• --configfile <FILE>
The NuGet configuration file (nuget.config) to use. If specified, only the settings from this file
will be used. If not specified, the hierarchy of configuration files from the current directory will
be used. For more information, see Common NuGet Configurations.
• --disable-parallel
Prevents restoring multiple projects in parallel.
• -?|-h|--help
Prints out a description of how to use the command.
• --ignore-failed-sources
Treats package source failures as warnings.
• --include-previews
Allows prerelease workload manifests.
• --interactive
Allows the command to stop and wait for user input or action. For example, to complete authentication.
• --no-cache
Prevents caching of packages and http requests.
• --skip-manifest-update
Skip updating the workload manifests. The workload manifests define what assets and versions need to
be installed for each workload.
• -s|--source <SOURCE>
Specifies the URI of the NuGet package source to use. This setting overrides all of the sources speci‐
fied in the nuget.config files. Multiple sources can be provided by specifying this option multiple
times.
• --temp-dir <PATH>
Specify the temporary directory used to download and extract NuGet packages (must be secure).
• -v|--verbosity <LEVEL>
Sets the verbosity level of the command. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed],
and diag[nostic]. The default is minimal. For more information, see <xref:Microsoft.Build.Frame‐
work.LoggerVerbosity>.
• --version
The workload set version to install or update to. If you specify the workload-set version in glob‐
al.json, you can’t use the --version option to specify the workload-set version. To make it possible
to use the --version option in that case, run the command outside of the path containing the glob‐
al.json file. Available since 8.0.400 SDK. For more information, see .NET SDK workload sets.
Example
• Restore workloads needed by MyApp.csproj:
dotnet workload restore MyApp.csproj
2024-10-02 dotnet-workload-restore(1)