Manage .NET tools and search published tools in NuGet.
# To install a global tool (don't use '--global' for local tools):
dotnet tool install --global <dotnetsay>
# To install tools defined in the local tool manifest:
dotnet tool restore
# To update a specific global tool (don't use '--global' for local tools):
dotnet tool update --global <tool_name>
# To uninstall a global tool (don't use '--global' for local tools):
dotnet tool uninstall --global <tool_name>
# To list installed global tools (don't use '--global' for local tools):
dotnet tool list --global
# To search tools in NuGet:
dotnet tool search <search_term>
# To display help:
dotnet tool --help
# ---
# To create a manifest file for tracking installed .NET tools (config created at: .config/dotnet-tools.json):
dotnet new tool-manifest
# To install the dotnet-ef (.NET Entity Framework) tool and track it in the manifest file:
dotnet tool install dotnet-ef
# To install dotnetsay as a global tool in the default location:
dotnet tool install -g dotnetsay
# To install dotnetsay as a local tool for the current directory:
dotnet tool install dotnetsay
# To list global tools installed in the default location:
dotnet tool list -g|--global
# To list local tools for the current directory:
dotnet tool list --local
# Update the specified .NET local tool
dotnet tool update <package> --local
# Update the specified .NET gobal tool
dotnet tool update <package> --global
# To update the dotnetsay global tool located in a specific Windows directory:
dotnet tool update dotnetsay --tool-path c:\global-tools
# To update the dotnetsay global tool located in a specific Linux/macOS directory:
dotnet tool update dotnetsay --tool-path ~/bin
# To update the dotnetsay global tool to the latest patch version, with a major version of 2, and a minor version of 0:
dotnet tool update -g dotnetsay --version 2.0.*
# To update the dotnetsay global tool to the lowest version within the specified range (> 2.0.0 && < 2.1.4), version 2.1.0 would be installed:
dotnet tool update -g dotnetsay --version (2.0.*,2.1.4)
# To uninstall a global tool:
dotnet tool uninstall <package> -g|--global
# To uninstall a local tool:
dotnet tool uninstall <package>
# To restore local tools for the current directory:
dotnet tool restore
# To restore using a NuGet configuration file:
dotnet tool restore --configfile nuget.config
# To restore packages and not cache packages and http requests:
dotnet tool restore --no-cache