Provided by: dotnet-host-7.0_7.0.105-0ubuntu2_amd64 bug

dotnet tool install

       This article applies to: ✔️ .NET Core 3.1 SDK and later versions

NAME

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

SYNOPSIS

              dotnet tool install <PACKAGE_NAME> -g|--global
                  [--add-source <SOURCE>] [--configfile <FILE>] [--disable-parallel]
                  [--framework <FRAMEWORK>] [--ignore-failed-sources] [--interactive]
                  [--no-cache] [--prerelease]
                  [--tool-manifest <PATH>] [-v|--verbosity <LEVEL>]
                  [--version <VERSION_NUMBER>]

              dotnet tool install <PACKAGE_NAME> --tool-path <PATH>
                  [--add-source <SOURCE>] [--configfile <FILE>] [--disable-parallel]
                  [--framework <FRAMEWORK>] [--ignore-failed-sources] [--interactive]
                  [--no-cache] [--prerelease]
                  [--tool-manifest <PATH>] [-v|--verbosity <LEVEL>]
                  [--version <VERSION_NUMBER>]

              dotnet tool install <PACKAGE_NAME> [--local]
                  [--add-source <SOURCE>] [--configfile <FILE>] [--disable-parallel]
                  [--framework <FRAMEWORK>] [--ignore-failed-sources] [--interactive]
                  [--no-cache] [--prerelease]
                  [--tool-manifest <PATH>] [-v|--verbosity <LEVEL>]
                  [--version <VERSION_NUMBER>]

              dotnet tool install -h|--help

DESCRIPTION

       The  dotnet  tool  install  command  provides  a way for you to install .NET tools on your
       machine.  To use the command, you specify one of the following installation options:

       • To install a global tool in the default location, use the --global option.

       • To install a global tool in a custom location, use the --tool-path option.

       • To install a local tool, omit the --global and --tool-path options.

       Global tools are installed in the following directories by default when you specify the -g
       or --global option:

       OS            Path
       ──────────────────────────────────────────
       Linux/macOS   $HOME/.dotnet/tools
       Windows       %USERPROFILE%\.dotnet\tools

       Local tools are added to a dotnet-tools.json file in a .config directory under the current
       directory.  If a manifest file doesn’t exist yet,  create  it  by  running  the  following
       command:

              dotnet new tool-manifest

       For more information, see Install a local tool.

ARGUMENTS

PACKAGE_NAME

         Name/ID of the NuGet package that contains the .NET tool to install.

OPTIONS

--add-source <SOURCE>

         Adds  an additional NuGet package source to use during installation.  Feeds are accessed
         in parallel, not sequentially in some order of precedence.   If  the  same  package  and
         version  is  in  multiple  feeds, the fastest feed wins.  For more information, see What
         happens when a NuGet package is installed?.

       • --configfile <FILE>

         The NuGet configuration file (nuget.config) to use.  If  specified,  only  the  settings
         from  this  file  will  be used.  If not specified, the hierarchy of configuration files
         from the current directory will  be  used.   For  more  information,  see  Common  NuGet
         Configurations.

       • --disable-parallel

         Prevent restoring multiple projects in parallel.

       • --framework <FRAMEWORK>

         Specifies  the target framework to install the tool for.  By default, the .NET SDK tries
         to choose the most appropriate target framework.

       • -g|--global

         Specifies that the installation is user wide.  Can’t be combined  with  the  --tool-path
         option.  Omitting both --global and --tool-path specifies a local tool installation.

       • -?|-h|--help

         Prints out a description of how to use the command.

       • --ignore-failed-sources

         Treat package source failures as warnings.

       • --interactive

         Allows  the command to stop and wait for user input or action.  For example, to complete
         authentication.

       • --local

         Update the tool and the local tool manifest.  Can’t be combined with the --global option
         or the --tool-path option.

       • --no-cache

         Do not cache packages and HTTP requests.

       • --prerelease

         Include prerelease packages.

       • --tool-manifest <PATH>

         Path to the manifest file.

       • --tool-path <PATH>

         Specifies  the  location  where  to  install  the  Global Tool.  PATH can be absolute or
         relative.  If PATH doesn’t exist,  the  command  tries  to  create  it.   Omitting  both
         --global and --tool-path specifies a local tool installation.

       • -v|--verbosity <LEVEL>

         Sets  the  verbosity  level  of  the  command.   Allowed  values are q[uiet], m[inimal],
         n[ormal],    d[etailed],    and    diag[nostic].     For    more    information,     see
         <xref:Microsoft.Build.Framework.LoggerVerbosity>.

       • --version <VERSION_NUMBER>

         The  version  of  the tool to install.  By default, the latest stable package version is
         installed.  Use this option to install preview or older versions of the tool.

EXAMPLES

dotnet tool install -g dotnetsay

         Installs dotnetsay (https://www.nuget.org/packages/dotnetsay/) as a global tool  in  the
         default location.

       • dotnet tool install dotnetsay --tool-path c:\global-tools

         Installs  dotnetsay  (https://www.nuget.org/packages/dotnetsay/)  as  a global tool in a
         specific Windows directory.

       • dotnet tool install dotnetsay --tool-path ~/bin

         Installs dotnetsay (https://www.nuget.org/packages/dotnetsay/) as a  global  tool  in  a
         specific Linux/macOS directory.

       • dotnet tool install -g dotnetsay --version 2.0.0

         Installs  version  2.0.0  of  dotnetsay (https://www.nuget.org/packages/dotnetsay/) as a
         global tool.

       • dotnet tool install dotnetsay

         Installs dotnetsay (https://www.nuget.org/packages/dotnetsay/) as a local tool  for  the
         current directory.

SEE ALSO

       • .NET tools

       • Tutorial: Install and use a .NET global tool using the .NET CLI

       • Tutorial: Install and use a .NET local tool using the .NET CLI

                                            2022-10-10                     dotnet-tool-install(1)