1dotnet-tool-install(1) .NET Documentation dotnet-tool-install(1)
2
3
4
6 This article applies to: ✔️ .NET Core 3.1 SDK and later versions
7
9 dotnet-tool-install - Installs the specified .NET tool on your machine.
10
12 dotnet tool install <PACKAGE_NAME> -g|--global
13 [--add-source <SOURCE>] [--configfile <FILE>] [--disable-parallel]
14 [--framework <FRAMEWORK>] [--ignore-failed-sources] [--interactive]
15 [--no-cache] [--prerelease]
16 [--tool-manifest <PATH>] [-v|--verbosity <LEVEL>]
17 [--version <VERSION_NUMBER>]
18
19 dotnet tool install <PACKAGE_NAME> --tool-path <PATH>
20 [--add-source <SOURCE>] [--configfile <FILE>] [--disable-parallel]
21 [--framework <FRAMEWORK>] [--ignore-failed-sources] [--interactive]
22 [--no-cache] [--prerelease]
23 [--tool-manifest <PATH>] [-v|--verbosity <LEVEL>]
24 [--version <VERSION_NUMBER>]
25
26 dotnet tool install <PACKAGE_NAME> [--local]
27 [--add-source <SOURCE>] [--configfile <FILE>] [--disable-parallel]
28 [--framework <FRAMEWORK>] [--ignore-failed-sources] [--interactive]
29 [--no-cache] [--prerelease]
30 [--tool-manifest <PATH>] [-v|--verbosity <LEVEL>]
31 [--version <VERSION_NUMBER>]
32
33 dotnet tool install -h|--help
34
36 The dotnet tool install command provides a way for you to install .NET
37 tools on your machine. To use the command, you specify one of the fol‐
38 lowing installation options:
39
40 • To install a global tool in the default location, use the --global
41 option.
42
43 • To install a global tool in a custom location, use the --tool-path
44 option.
45
46 • To install a local tool, omit the --global and --tool-path options.
47
48 Global tools are installed in the following directories by default when
49 you specify the -g or --global option:
50
51 OS Path
52 ──────────────────────────────────
53 Linux/macOS $HOME/.dotnet/tools
54 Windows %USERPROFILE%\.dot‐
55 net\tools
56
57 Local tools are added to a dotnet-tools.json file in a .config directo‐
58 ry under the current directory. If a manifest file doesn’t exist yet,
59 create it by running the following command:
60
61 dotnet new tool-manifest
62
63 For more information, see Install a local tool.
64
66 • PACKAGE_NAME
67
68 Name/ID of the NuGet package that contains the .NET tool to install.
69
71 • --add-source <SOURCE>
72
73 Adds an additional NuGet package source to use during installation.
74 Feeds are accessed in parallel, not sequentially in some order of
75 precedence. If the same package and version is in multiple feeds,
76 the fastest feed wins. For more information, see What happens when a
77 NuGet package is installed?.
78
79 • --configfile <FILE>
80
81 The NuGet configuration file (nuget.config) to use. If specified,
82 only the settings from this file will be used. If not specified, the
83 hierarchy of configuration files from the current directory will be
84 used. For more information, see Common NuGet Configurations.
85
86 • --disable-parallel
87
88 Prevent restoring multiple projects in parallel.
89
90 • --framework <FRAMEWORK>
91
92 Specifies the target framework to install the tool for. By default,
93 the .NET SDK tries to choose the most appropriate target framework.
94
95 • -g|--global
96
97 Specifies that the installation is user wide. Can’t be combined with
98 the --tool-path option. Omitting both --global and --tool-path spec‐
99 ifies a local tool installation.
100
101 • -?|-h|--help
102
103 Prints out a description of how to use the command.
104
105 • --ignore-failed-sources
106
107 Treat package source failures as warnings.
108
109 • --interactive
110
111 Allows the command to stop and wait for user input or action. For
112 example, to complete authentication.
113
114 • --local
115
116 Update the tool and the local tool manifest. Can’t be combined with
117 the --global option or the --tool-path option.
118
119 • --no-cache
120
121 Do not cache packages and HTTP requests.
122
123 • --prerelease
124
125 Include prerelease packages.
126
127 • --tool-manifest <PATH>
128
129 Path to the manifest file.
130
131 • --tool-path <PATH>
132
133 Specifies the location where to install the Global Tool. PATH can be
134 absolute or relative. If PATH doesn’t exist, the command tries to
135 create it. Omitting both --global and --tool-path specifies a local
136 tool installation.
137
138 • -v|--verbosity <LEVEL>
139
140 Sets the verbosity level of the command. Allowed values are q[uiet],
141 m[inimal], n[ormal], d[etailed], and diag[nostic]. For more informa‐
142 tion, see <xref:Microsoft.Build.Framework.LoggerVerbosity>.
143
144 • --version <VERSION_NUMBER>
145
146 The version of the tool to install. By default, the latest stable
147 package version is installed. Use this option to install preview or
148 older versions of the tool.
149
151 • dotnet tool install -g dotnetsay
152
153 Installs dotnetsay (https://www.nuget.org/packages/dotnetsay/) as a
154 global tool in the default location.
155
156 • dotnet tool install dotnetsay --tool-path c:\global-tools
157
158 Installs dotnetsay (https://www.nuget.org/packages/dotnetsay/) as a
159 global tool in a specific Windows directory.
160
161 • dotnet tool install dotnetsay --tool-path ~/bin
162
163 Installs dotnetsay (https://www.nuget.org/packages/dotnetsay/) as a
164 global tool in a specific Linux/macOS directory.
165
166 • dotnet tool install -g dotnetsay --version 2.0.0
167
168 Installs version 2.0.0 of dotnetsay (https://www.nuget.org/pack‐
169 ages/dotnetsay/) as a global tool.
170
171 • dotnet tool install dotnetsay
172
173 Installs dotnetsay (https://www.nuget.org/packages/dotnetsay/) as a
174 local tool for the current directory.
175
177 • .NET tools
178
179 • Tutorial: Install and use a .NET global tool using the .NET CLI
180
181 • Tutorial: Install and use a .NET local tool using the .NET CLI
182
183
184
185 2022-10-10 dotnet-tool-install(1)