1(1)                                  .NET                                  (1)
2
3
4

dotnet tool install

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

NAME

9       dotnet tool install - Installs the specified .NET tool on your machine.
10

SYNOPSIS

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] [--tool-manifest <PATH>] [-v|--verbosity <LEVEL>]
16                  [--version <VERSION_NUMBER>]
17
18              dotnet tool install <PACKAGE_NAME> --tool-path <PATH>
19                  [--add-source <SOURCE>] [--configfile <FILE>] [--disable-parallel]
20                  [--framework <FRAMEWORK>] [--ignore-failed-sources] [--interactive]
21                  [--no-cache] [--tool-manifest <PATH>] [-v|--verbosity <LEVEL>]
22                  [--version <VERSION_NUMBER>]
23
24              dotnet tool install <PACKAGE_NAME> [--local]
25                  [--add-source <SOURCE>] [--configfile <FILE>] [--disable-parallel]
26                  [--framework <FRAMEWORK>] [--ignore-failed-sources] [--interactive]
27                  [--no-cache] [--tool-manifest <PATH>] [-v|--verbosity <LEVEL>]
28                  [--version <VERSION_NUMBER>]
29
30              dotnet tool install -h|--help
31

DESCRIPTION

33       The  dotnet tool install command provides a way for you to install .NET
34       tools on your machine.  To use the command, you specify one of the fol‐
35       lowing installation options:
36
37       • To  install  a  global tool in the default location, use the --global
38         option.
39
40       • To install a global tool in a custom location,  use  the  --tool-path
41         option.
42
43       • To install a local tool, omit the --global and --tool-path options.
44
45       Local tools are available starting with .NET Core SDK 3.0.
46
47       Global tools are installed in the following directories by default when
48       you specify the -g or --global option:
49
50       OS            Path
51       ──────────────────────────────────
52       Linux/macOS   $HOME/.dotnet/tools
53       Windows       %USERPROFILE%\.dot‐
54                     net\tools
55
56       Local tools are added to a dotnet-tools.json file in a .config directo‐
57       ry under the current directory.  If a manifest file doesn’t exist  yet,
58       create it by running the following command:
59
60              dotnet new tool-manifest
61
62       For more information, see Install a local tool.
63
64   Arguments
65PACKAGE_NAME
66
67         Name/ID of the NuGet package that contains the .NET tool to install.
68

OPTIONS

70--add-source <SOURCE>
71
72         Adds  an  additional NuGet package source to use during installation.
73         Feeds are accessed in parallel, not sequentially  in  some  order  of
74         precedence.   If  the  same package and version is in multiple feeds,
75         the fastest feed wins.  For more information, see What happens when a
76         NuGet package is installed?.
77
78--configfile <FILE>
79
80         The  NuGet  configuration  file (nuget.config) to use.  If specified,
81         only the settings from this file will be used.  If not specified, the
82         hierarchy  of  configuration files from the current directory will be
83         used.  For more information, see Common NuGet Configurations.
84
85--disable-parallel
86
87         Prevent restoring multiple projects in parallel.
88
89--framework <FRAMEWORK>
90
91         Specifies the target framework to install the tool for.  By  default,
92         the .NET SDK tries to choose the most appropriate target framework.
93
94-g|--global
95
96         Specifies that the installation is user wide.  Can’t be combined with
97         the --tool-path option.  Omitting both --global and --tool-path spec‐
98         ifies a local tool installation.
99
100-?|-h|--help
101
102         Prints out a description of how to use the command.
103
104--ignore-failed-sources
105
106         Treat package source failures as warnings.
107
108--interactive
109
110         Allows  the  command  to stop and wait for user input or action.  For
111         example, to complete authentication.
112
113--local
114
115         Update the tool and the local tool manifest.  Can’t be combined  with
116         the --global option or the --tool-path option.
117
118--no-cache
119
120         Do not cache packages and HTTP requests.
121
122--tool-manifest <PATH>
123
124         Path to the manifest file.
125
126--tool-path <PATH>
127
128         Specifies the location where to install the Global Tool.  PATH can be
129         absolute or relative.  If PATH doesn’t exist, the  command  tries  to
130         create  it.  Omitting both --global and --tool-path specifies a local
131         tool installation.
132
133-v|--verbosity <LEVEL>
134
135         Sets the verbosity level of the command.  Allowed values are q[uiet],
136         m[inimal], n[ormal], d[etailed], and diag[nostic].  For more informa‐
137         tion, see <xref:Microsoft.Build.Framework.LoggerVerbosity>.
138
139--version <VERSION_NUMBER>
140
141         The version of the tool to install.  By default,  the  latest  stable
142         package  version is installed.  Use this option to install preview or
143         older versions of the tool.
144

EXAMPLES

146dotnet tool install -g dotnetsay
147
148         Installs dotnetsay (https://www.nuget.org/packages/dotnetsay/)  as  a
149         global tool in the default location.
150
151dotnet tool install dotnetsay --tool-path c:\global-tools
152
153         Installs  dotnetsay  (https://www.nuget.org/packages/dotnetsay/) as a
154         global tool in a specific Windows directory.
155
156dotnet tool install dotnetsay --tool-path ~/bin
157
158         Installs dotnetsay (https://www.nuget.org/packages/dotnetsay/)  as  a
159         global tool in a specific Linux/macOS directory.
160
161dotnet tool install -g dotnetsay --version 2.0.0
162
163         Installs  version  2.0.0  of  dotnetsay  (https://www.nuget.org/pack
164         ages/dotnetsay/) as a global tool.
165
166dotnet tool install dotnetsay
167
168         Installs dotnetsay (https://www.nuget.org/packages/dotnetsay/)  as  a
169         local tool for the current directory.
170
171   See also
172       • .NET tools
173
174       • Tutorial: Install and use a .NET global tool using the .NET CLI
175
176       • Tutorial: Install and use a .NET local tool using the .NET CLI
177
178
179
180                                                                           (1)
Impressum