In .NET Core 2.1 SDK, all tools operations use the dotnet tool command. The following options are available.
dotnet tool installThe 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:
--global option.--tool-path option.--global and --tool-path options.To install the dotnetsay global tool in the default location, use the following command.
dotnet tool install -g dotnetsay
To install the dotnetsay global tool located in a specific Windows directory.
dotnet tool install dotnetsay --tool-path c:\global-tools
dotnet tool updateThe dotnet tool update command provides a way for you to update .NET tools on your machine to the latest stable version of the package. The command uninstalls and reinstalls a tool, effectively updating it. To use the command, you specify one of the following options:
--global option.--tool-path option.--local option.To update the dotnetsay global tool, use the following command.
dotnet tool update -g dotnetsay
To update the dotnetsay global tool located in a specific Windows directory.
dotnet tool update dotnetsay --tool-path c:\global-tools
dotnet tool listThe dotnet tool list command provides a way for you to list all .NET global, tool-path, or local tools installed on your machine. The command lists the package name, the version installed, and the tool command. To use the command, you specify one of the following:
--global option--tool-path option.--local option or omit the --global, --tool-path, and --local options.To list all global tools installed user-wide on your machine (current user profile).
dotnet tool list -g
To list the global tools from a specific Windows directory.
dotnet tool list --tool-path c:\global-tools
dotnet tool uninstallThe dotnet tool uninstall command provides a way for you to uninstall .NET tools from your machine. To use the command, you specify one of the following options:
--global option.--tool-path option.--global and --tool-path options.To uninstalls the dotnetsay global tool.
dotnet tool uninstall -g dotnetsay
To uninstalls the dotnetsay global tool from a specific Windows directory.
dotnet tool uninstall dotnetsay --tool-path c:\global-tools