Installs or updates a dotnet CLI tool. Only supports dotnet 5+. Runs a combination of dotnet --list-sdks, dotnet new tool-manifest,
dotnet tool uninstall and dotnet tool install. Nuget.org will be queried to determine the latest compatible version of the tool for your
latest installed dotnet SDK version, or the dotnet SDK version specified in options (the version passed in options must also be installed).
For local installs, a new tool manifest will be created with the command dotnet new tool-manifest if it doesn't already exist. Note that dotnet
searches up the directory tree until it finds a tool manifest.
If the tool is already installed and the version installed is newer (because an older dotnet version was specified in the options), the installed
version will be overwritten with the latest compatible version for the dotnet version specified in the options rather than trying to simply run the
dotnet tool update command, which would throw an error in this scenario.
Installs or updates a dotnet CLI tool. Only supports dotnet 5+. Runs a combination of
dotnet --list-sdks,dotnet new tool-manifest,dotnet tool uninstallanddotnet tool install. Nuget.org will be queried to determine the latest compatible version of the tool for your latest installed dotnet SDK version, or the dotnet SDK version specified in options (the version passed in options must also be installed).Defaults that can be overridden with options (EnsureDotnetToolOptions):
For local installs, a new tool manifest will be created with the command
dotnet new tool-manifestif it doesn't already exist. Note that dotnet searches up the directory tree until it finds a tool manifest.If the tool is already installed and the version installed is newer (because an older dotnet version was specified in the options), the installed version will be overwritten with the latest compatible version for the dotnet version specified in the options rather than trying to simply run the
dotnet tool updatecommand, which would throw an error in this scenario.Docs for dotnet tools: https://learn.microsoft.com/en-us/dotnet/core/tools/global-tools
Docs for
dotnet tool install: https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-tool-install