1dotnet-install scripts(1)          .NET Core         dotnet-install scripts(1)
2
3
4

dotnet-install scripts reference

NAME

7       dotnet-install.ps1  |  dotnet-install.sh  -  Script used to install the
8       .NET Core CLI tools and the shared runtime.
9

SYNOPSIS

11       Windows:
12
13       dotnet-install.ps1 [-Channel] [-Version] [-InstallDir] [-Architec‐
14       ture] [-SharedRuntime] [-DryRun] [-NoPath] [-AzureFeed] [-ProxyAd‐
15       dress] [--Verbose] [--Help]
16
17       macOS/Linux:
18
19       dotnet-install.sh [--channel] [--version] [--install-dir] [--architec‐
20       ture] [--shared-runtime] [--dry-run] [--no-path] [--azure-feed] [--ver‐
21       bose] [--help]
22

DESCRIPTION

24       The dotnet-install scripts are used to perform a non-admin installation
25       of  the  .NET  Core SDK, which includes the .NET Core CLI tools and the
26       shared runtime.
27
28       We recommend that you use the stable version that  is  hosted  on  .NET
29       Core main website.  The direct paths to the scripts are:
30
31       · https://dot.net/v1/dotnet-install.sh (bash, UNIX)
32
33       · https://dot.net/v1/dotnet-install.ps1 (Powershell, Windows)
34
35       The  main  usefulness  of  these scripts is in automation scenarios and
36       non-admin installations.  There are two scripts: One  is  a  PowerShell
37       script  that  works on Windows.  The other script is a bash script that
38       works on Linux/macOS.  Both scripts have the same behavior.   The  bash
39       script  also  reads  PowerShell  switches,  so  you  can use PowerShell
40       switches with the script on Linux/macOS systems.
41
42       The installation scripts download the ZIP/tarball  file  from  the  CLI
43       build drops and proceed to install it in either the default location or
44       in a location specified by -InstallDir|--install-dir.  By default,  the
45       installation  scripts  download the SDK and install it.  If you wish to
46       only obtain the shared runtime, specify the --shared-runtime argument.
47
48       By default, the script adds the install location to the $PATH  for  the
49       current  session.   Override  this  default  behavior by specifying the
50       --no-path argument.
51
52       Before running the script, install the required dependencies.
53
54       You can install a specific version using the --version  argument.   The
55       version   must   be   specified  as  a  3-part  version  (for  example,
56       1.0.0-13232).  If omitted, it uses the latest version.
57

OPTIONS

59       -Channel <CHANNEL>
60
61       Specifies the source channel for the installation.  The possible values
62       are:
63
64       · Current - Current release
65
66       · LTS - Long-Term Support channel (current supported release)
67
68       · Two-part  version  in X.Y format representing a specific release (for
69         example, 2.0 or 1.0)
70
71       · Branch name [for example, release/2.0.0,  release/2.0.0-preview2,  or
72         master for the latest from the master branch (“bleeding edge” nightly
73         releases)]
74
75       The default value is LTS.  For more information on .NET  support  chan‐
76       nels, see the .NET Core Support Lifecycle topic.
77
78       -Version <VERSION>
79
80       Represents a specific build version.  The possible values are:
81
82       · latest - Latest build on the channel (used with the -Channel option)
83
84       · coherent - Latest coherent build on the channel; uses the latest sta‐
85         ble package combination (used with Branch name -Channel options)
86
87       · Three-part version in X.Y.Z format representing a specific build ver‐
88         sion;  supersedes  the  -Channel  option.   For  example:  2.0.0-pre‐
89         view2-006120
90
91       If omitted, -Version defaults to latest.
92
93       -InstallDir <DIRECTORY>
94
95       Specifies the installation  path.   The  directory  is  created  if  it
96       doesn't  exist.  The default value is %LocalAppData%.dotnet.  Note that
97       binaries are placed directly in the directory.
98
99       -Architecture <ARCHITECTURE>
100
101       Architecture of the .NET Core binaries to install.  Possible values are
102       auto,  x64,  and  x86.  The default value is auto, which represents the
103       currently running OS architecture.
104
105       -SharedRuntime
106
107       If set, this switch limits installation to the shared runtime.  The en‐
108       tire SDK isn't installed.
109
110       -DryRun
111
112       If set, the script won't perform the installation; but instead, it dis‐
113       plays what command line to use to consistently  install  the  currently
114       requested  version  of  the  .NET Core CLI.  For example if you specify
115       version latest, it displays a link with the specific  version  so  that
116       this  command can be used deterministically in a build script.  It also
117       displays the binary's location if you prefer to install or download  it
118       yourself.
119
120       -NoPath
121
122       If set, the prefix/installdir are not exported to the path for the cur‐
123       rent session.  By default, the script will modify the PATH, which makes
124       the CLI tools available immediately after install.
125
126       -AzureFeed
127
128       Specifies the URL for the Azure feed to the installer.  It isn't recom‐
129       mended that you change this  value.   The  default  is  https://dotnet
130       cli.azureedge.net/dotnet.
131
132       -ProxyAddress
133
134       If  set,  the installer uses the proxy when making web requests.  (Only
135       valid for Windows)
136
137       --verbose
138
139       Display diagnostics information.
140
141       --help
142
143       Prints out help for the script.
144

EXAMPLES

146       Install the latest long-term supported (LTS) version to the default lo‐
147       cation:
148
149       Windows:
150
151       ./dotnet-install.ps1 -Channel LTS
152
153       macOS/Linux:
154
155       ./dotnet-install.sh --channel LTS
156
157       Install the latest version from 2.0 channel to the specified location:
158
159       Windows:
160
161       ./dotnet-install.ps1 -Channel 2.0 -InstallDir C:\cli
162
163       macOS/Linux:
164
165       ./dotnet-install.sh --channel 2.0 --install-dir ~/cli
166
167       Install the 1.1.0 version of the shared runtime:
168
169       Windows:
170
171       ./dotnet-install.ps1 -SharedRuntime -Version 1.1.0
172
173       macOS/Linux:
174
175       ./dotnet-install.sh --shared-runtime --version 1.1.0
176
177       Obtain script and install .NET Core CLI one-liner examples:
178
179       Windows:
180
181       @powershell -NoProfile -ExecutionPolicy unrestricted -Com‐
182       mand "&([scriptblock]::Create((Invoke-WebRe‐
183       quest -useb 'https://dot.net/v1/dotnet-install.ps1'))) <additional in‐
184       stall-script args>"
185
186       macOS/Linux:
187
188       curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin <addi‐
189       tional install-script args>
190
191   See also
192       .NET Core releases
193       .NET Core Runtime and SDK download archive
194

AUTHORS

196       blackdwarf.
197
198
199
200                                                     dotnet-install scripts(1)
Impressum