1dotnet-workload-install(1)    .NET Documentation    dotnet-workload-install(1)
2
3
4

dotnet workload install

6       This article applies to: ✔️ .NET 6 SDK and later versions
7

NAME

9       dotnet-workload-install - Installs optional workloads.
10

SYNOPSIS

12              dotnet workload install <WORKLOAD_ID>...
13                  [--configfile <FILE>] [--disable-parallel]
14                  [--ignore-failed-sources] [--include-previews] [--interactive]
15                  [--no-cache] [--skip-manifest-update]
16                  [--source <SOURCE>] [--temp-dir <PATH>] [-v|--verbosity <LEVEL>]
17
18              dotnet workload install -?|-h|--help
19

DESCRIPTION

21       The dotnet workload install command installs one or more optional work‐
22       loads.  Optional workloads can be installed on top of the .NET  SDK  to
23       provide  support  for  various application types, such as .NET MAUI and
24       Blazor WebAssembly AOT  (https://devblogs.microsoft.com/aspnet/asp-net-
25       core-updates-in-net-6-preview-4/#blazor-webassembly-ahead-of-time-aot-
26       compilation).
27
28       Use dotnet workload search to learn what workloads are available to in‐
29       stall.
30
31   When to run elevated
32       For macOS and Linux SDK installations that are installed to a protected
33       directory, the command needs to run elevated (use  the  sudo  command).
34       On Windows, the command doesn’t need to run elevated even if the SDK is
35       installed to the Program Files directory.  For Windows, the command us‐
36       es MSI installers for that location.
37
38   Results vary by SDK version
39       The  dotnet  workload  commands  operate in the context of specific SDK
40       versions.  Suppose you have both .NET 6.0.100 SDK and .NET 6.0.200  SDK
41       installed.   The  dotnet  workload commands will give different results
42       depending on which SDK version you select.  This  behavior  applies  to
43       major and minor version and feature band differences, not to patch ver‐
44       sion differences.  For example, .NET SDK 6.0.101 and 6.0.102  give  the
45       same  results, whereas 6.0.100 and 6.0.200 give different results.  You
46       can specify the SDK version by using the global.json file or the --sdk-
47       version option of the dotnet workload commands.
48
49   Advertising manifests
50       The  names  and versions of the assets that a workload installation re‐
51       quires are maintained in manifests.  By default,  the  dotnet  workload
52       install  command downloads the latest available manifests before it in‐
53       stalls a workload.  The local copy of a manifest then provides the  in‐
54       formation needed to find and download the assets for a workload.
55
56       The  dotnet  workload  list  command compares the versions of installed
57       workloads with the currently available versions.  When it finds that  a
58       version  newer  than  the installed version is available, it advertises
59       that fact in the command output.  These newer-version notifications  in
60       dotnet workload list are available starting in .NET 6.
61
62       To  enable  these  notifications,  the latest available versions of the
63       manifests are downloaded and stored as  advertising  manifests.   These
64       downloads  happen asynchronously in the background when any of the fol‐
65       lowing commands are run.
66
67       • dotnet build
68
69       • dotnet pack
70
71       • dotnet publish
72
73       • dotnet restore
74
75       • dotnet run
76
77       • dotnet test
78
79       If a command finishes before the manifest download finishes, the  down‐
80       load  is  stopped.   The  download  is tried again the next time one of
81       these commands is run.  You can set environment  variables  to  disable
82       these  background  downloads  or  control their frequency.  By default,
83       they don’t happen more than once a day.
84
85       You can prevent the dotnet workload install command from doing manifest
86       downloads by using the --skip-manifest-update option.
87
88       The  dotnet  workload  update  command also downloads advertising mani‐
89       fests.  The downloads are required to learn if an update is  available,
90       so  there  is no option to prevent them from running.  However, you can
91       use the --advertising-manifests-only option to  skip  workload  updates
92       and  only do the manifest downloads.  This option is available starting
93       in .NET 6.
94

ARGUMENTS

96WORKLOAD_ID...
97
98         The workload ID or multiple IDs  to  install.   Use  dotnet  workload
99         search to learn what workloads are available.
100

OPTIONS

102--configfile <FILE>
103
104         The  NuGet  configuration  file (nuget.config) to use.  If specified,
105         only the settings from this file will be used.  If not specified, the
106         hierarchy  of  configuration files from the current directory will be
107         used.  For more information, see Common NuGet Configurations.
108
109--disable-parallel
110
111         Prevents restoring multiple projects in parallel.
112
113-?|-h|--help
114
115         Prints out a description of how to use the command.
116
117--ignore-failed-sources
118
119         Treats package source failures as warnings.
120
121--include-previews
122
123         Allows prerelease workload manifests.
124
125--interactive
126
127         Allows the command to stop and wait for user input  or  action.   For
128         example, to complete authentication.
129
130--no-cache
131
132         Prevents caching of packages and http requests.
133
134--skip-manifest-update
135
136         Skip  updating the workload manifests.  The workload manifests define
137         what assets and versions need to be installed for each workload.
138
139-s|--source <SOURCE>
140
141         Specifies the URI of the NuGet package source to use.   This  setting
142         overrides  all  of  the  sources specified in the nuget.config files.
143         Multiple sources can be provided by specifying this  option  multiple
144         times.
145
146--temp-dir <PATH>
147
148         Specify  the  temporary  directory used to download and extract NuGet
149         packages (must be secure).
150
151-v|--verbosity <LEVEL>
152
153         Sets the verbosity level of the command.  Allowed values are q[uiet],
154         m[inimal],  n[ormal],  d[etailed],  and diag[nostic].  The default is
155         minimal.  If you specify detailed or diagnostic verbosity,  the  com‐
156         mand displays information about the Nuget packages that it downloads.
157

EXAMPLES

159       • Install the maui workload:
160
161                dotnet workload install maui
162
163       • Install the maui-android and maui-ios workloads:
164
165                dotnet workload install maui-android maui-ios
166
167
168
169                                  2022-10-10        dotnet-workload-install(1)
Impressum