1dotnet-install scripts(1) .NET Core dotnet-install scripts(1)
2
3
4
7 dotnet-install.ps1 | dotnet-install.sh - Script used to install the
8 .NET Core CLI tools and the shared runtime.
9
11 Windows:
12
13 dotnet-install.ps1 [-Channel] [-Version] [-InstallDir] [-Architecture]
14 [-SharedRuntime] [-Runtime] [-DryRun] [-NoPath] [-Verbose] [-AzureFeed]
15 [-UncachedFeed] [-NoCdn] [-FeedCredential] [-ProxyAddress] [-Prox‐
16 yUseDefaultCredentials] [-SkipNonVersionedFiles] [-Help]
17
18 macOS/Linux:
19
20 dotnet-install.sh [--channel] [--version] [--install-dir] [--architec‐
21 ture] [--runtime] [--dry-run] [--no-path] [--verbose] [--azure-feed]
22 [--uncached-feed] [--no-cdn] [--feed-credential] [--runtime-id]
23 [--skip-non-versioned-files] [--help]
24
26 The dotnet-install scripts are used to perform a non-admin installation
27 of the .NET Core SDK, which includes the .NET Core CLI tools and the
28 shared runtime.
29
30 We recommend that you use the stable version that is hosted on .NET
31 Core main website. The direct paths to the scripts are:
32
33 · https://dot.net/v1/dotnet-install.sh (bash, UNIX)
34
35 · https://dot.net/v1/dotnet-install.ps1 (Powershell, Windows)
36
37 The main usefulness of these scripts is in automation scenarios and
38 non-admin installations. There are two scripts: one is a PowerShell
39 script that works on Windows, and the other is a bash script that works
40 on Linux/macOS. Both scripts have the same behavior. The bash script
41 also reads PowerShell switches, so you can use PowerShell switches with
42 the script on Linux/macOS systems.
43
44 The installation scripts download the ZIP/tarball file from the CLI
45 build drops and proceed to install it in either the default location or
46 in a location specified by -InstallDir|--install-dir. By default, the
47 installation scripts download the SDK and install it. If you wish to
48 only obtain the shared runtime, specify the --runtime argument.
49
50 By default, the script adds the install location to the $PATH for the
51 current session. Override this default behavior by specifying the
52 --no-path argument.
53
54 Before running the script, install the required dependencies.
55
56 You can install a specific version using the --version argument. The
57 version must be specified as a three-part version (for example,
58 1.0.0-13232). If not provided, it uses the latest version.
59
61 · -Channel <CHANNEL>
62
63 Specifies the source channel for the installation. The possible val‐
64 ues are:
65
66 · Current - Most current release.
67
68 · LTS - Long-Term Support channel (most current supported release).
69
70 · Two-part version in X.Y format representing a specific release (for
71 example, 2.0 or 1.0).
72
73 · Branch name. For example, release/2.0.0, release/2.0.0-preview2,
74 or master (for nightly releases).
75
76 The default value is LTS. For more information on .NET support chan‐
77 nels, see the .NET Support Policy page.
78
79 · -Version <VERSION>
80
81 Represents a specific build version. The possible values are:
82
83 · latest - Latest build on the channel (used with the -Channel op‐
84 tion).
85
86 · coherent - Latest coherent build on the channel; uses the latest
87 stable package combination (used with Branch name -Channel op‐
88 tions).
89
90 · Three-part version in X.Y.Z format representing a specific build
91 version; supersedes the -Channel option. For example: 2.0.0-pre‐
92 view2-006120.
93
94 If not specified, -Version defaults to latest.
95
96 · -InstallDir <DIRECTORY>
97
98 Specifies the installation path. The directory is created if it
99 doesn’t exist. The default value is *%LocalAppData%. Binaries are
100 placed directly in this directory.
101
102 · -Architecture <ARCHITECTURE>
103
104 Architecture of the .NET Core binaries to install. Possible values
105 are <auto>, amd64, x64, x86, arm64, and arm. The default value is
106 <auto>, which represents the currently running OS architecture.
107
108 · -SharedRuntime
109
110 [!NOTE] This parameter is obsolete and may be removed in a fu‐
111 ture version of the script. The recommended alternative is
112 the Runtime option.
113
114 Installs just the shared runtime bits, not the entire SDK. This is
115 equivalent to specifying -Runtime dotnet.
116
117 · -Runtime <RUNTIME>
118
119 Installs just the shared runtime, not the entire SDK. The possible
120 values are:
121
122 · dotnet - the Microsoft.NETCore.App shared runtime.
123
124 · aspnetcore - the Microsoft.AspNetCore.App shared runtime.
125
126 · -DryRun
127
128 If set, the script won’t perform the installation. Instead, it dis‐
129 plays what command line to use to consistently install the currently
130 requested version of the .NET Core CLI. For example, if you specify
131 version latest, it displays a link with the specific version so that
132 this command can be used deterministically in a build script. It al‐
133 so displays the binary’s location if you prefer to install or down‐
134 load it yourself.
135
136 · -NoPath
137
138 If set, the installation folder isn’t exported to the path for the
139 current session. By default, the script modifies the PATH, which
140 makes the CLI tools available immediately after install.
141
142 · -Verbose
143
144 Displays diagnostics information.
145
146 · -AzureFeed
147
148 Specifies the URL for the Azure feed to the installer. We recommend‐
149 ed that you don’t change this value. The default value is
150 https://dotnetcli.azureedge.net/dotnet.
151
152 · -UncachedFeed
153
154 Allows changing the URL for the uncached feed used by this installer.
155 We recommended that you don’t change this value.
156
157 · -NoCdn
158
159 Disables downloading from the Azure Content Delivery Network (CDN)
160 and uses the uncached feed directly.
161
162 · -FeedCredential
163
164 Used as a query string to append to the Azure feed. It allows chang‐
165 ing the URL to use non-public blob storage accounts.
166
167 · -ProxyAddress
168
169 If set, the installer uses the proxy when making web requests. (Only
170 valid for Windows)
171
172 · ProxyUseDefaultCredentials
173
174 If set, the installer uses the credentials of the current user when
175 using proxy address. (Only valid for Windows)
176
177 · -SkipNonVersionedFiles
178
179 Skips installing non-versioned files, such as dotnet.exe, if they al‐
180 ready exist.
181
182 · -Help
183
184 Prints out help for the script.
185
187 · Install the latest long-term supported (LTS) version to the default
188 location:
189
190 Windows:
191
192 ./dotnet-install.ps1 -Channel LTS
193
194 macOS/Linux:
195
196 ./dotnet-install.sh --channel LTS
197
198 · Install the latest version from 2.0 channel to the specified loca‐
199 tion:
200
201 Windows:
202
203 ./dotnet-install.ps1 -Channel 2.0 -InstallDir C:\cli
204
205 macOS/Linux:
206
207 ./dotnet-install.sh --channel 2.0 --install-dir ~/cli
208
209 · Install the 1.1.0 version of the shared runtime:
210
211 Windows:
212
213 ./dotnet-install.ps1 -Runtime dotnet -Version 1.1.0
214
215 macOS/Linux:
216
217 ./dotnet-install.sh --runtime dotnet --version 1.1.0
218
219 · Obtain script and install the 2.1.2 version behind a corporate proxy
220 (Windows only):
221
222 Invoke-WebRequest 'https://dot.net/v1/dotnet-install.ps1' -Proxy $env:HTTP_PROXY -ProxyUseDefaultCredentials -OutFile 'dotnet-install.ps1';
223 ./dotnet-install.ps1 -InstallDir '~/.dotnet' -Version '2.1.2' -ProxyAddress $env:HTTP_PROXY -ProxyUseDefaultCredentials;
224
225 · Obtain script and install .NET Core CLI one-liner examples:
226
227 Windows:
228
229 @powershell -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1'))) <additional install-script args>"
230
231 macOS/Linux:
232
233 curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin <additional install-script args>
234
235 See also
236 · .NET Core releases
237
238 · .NET Core Runtime and SDK download archive
239
240
241
242 dotnet-install scripts(1)