dotnet-tool-install - Man Page

Installs the specified .NET tool on your machine.

dotnet tool install

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

Synopsis

dotnet tool install <PACKAGE_NAME> -g|--global
    [--allow-downgrade] [-a|--arch <ARCHITECTURE>]
    [--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>
    [--allow-downgrade] [-a|--arch <ARCHITECTURE>]
    [--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]
    [--allow-downgrade] [-a|--arch <ARCHITECTURE>]
    [--add-source <SOURCE>] [--configfile <FILE>]
    [--create-manifest-if-needed] [--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:

Installation locations

Global tools

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

OSPath
Linux/macOS$HOME/.dotnet/tools
Windows%USERPROFILE%\.dotnet\tools

Executables are generated in these folders for each globally installed tool, although the actual tool binaries are nested deep into the sibling .store directory.

On Linux after installing a command-line tool with dotnet tool, the tool can be executed only from the $HOME/.dotnet/tools path. To make the tool executable from any directory, update the PATH environment variable. To make the updated PATH environment variable permanent in your shell, update your shell settings. For Bash, this is the $HOME/.bashrc file.

--tool-path tools

Tools with explicit tool paths are stored wherever you specified the --tool-path parameter to point to. They’re stored in the same way as global tools: an executable binary with the actual binaries in a sibling .store directory.

Local tools

Local tools are stored in the NuGet global directory, whatever you’ve set that to be. There are shim files in $HOME/.dotnet/toolResolverCache for each local tool that point to where the tools are within that location.

References to 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 using the --create-manifest-if-needed option or by running the following command:

dotnet new tool-manifest

For more information, see Install a local tool.

Arguments

Options

Examples

See Also

Info

2024-10-02 .NET Documentation