Incorrect docs on installing a global tool in a custom location
Type of issue
Typo, mistake in instructions
Description
Under section entitled 'Install a global tool in a custom location' on page https://learn.microsoft.com/en-us/dotnet/core/tools/global-tools, it says
To install a tool as a global tool in a custom location, use the --tool-path option of dotnet tool install, as shown in the following examples:
dotnet tool install dotnetsay --tool-path c:\dotnet-toolsdotnet tool install dotnetsay --tool-path ~/bin
The above examples are incorrect as they omit the -g or --global switch, so they install tools only locally.
Additionally, when I run the below command (it's a real command you can try out)
dotnet tool install linqtoxsdcore --add-source https://pkgs.dev.azure.com/mamift1/LinqToXsdCore/_packaging/LinqToXsdCore-Release/nuget/v3/index.json --prerelease --tool-path C:\Development\dotnet-tools --global
I get this error message:
The local option(--local), the global option (--global), the tool path option (--tool-path), can only have one at a time. Specify only one of the options: --global --tool-path.
I am using .NET 10.0.100 SDK; perhaps the docs were correct in the past, but now the instructions are no longer correct. Or unless this is a bug with the dotnet tool --global switch? I don't know I'm just bringing this to your attention.
Page URL
https://learn.microsoft.com/en-us/dotnet/core/tools/global-tools
Content source URL
https://github.com/dotnet/docs/blob/main/docs/core/tools/global-tools.md
Document Version Independent Id
13b38200-ed54-7bfe-f7cf-099cf1b010f4
Platform Id
9b3f8cae-8b7a-768b-2e02-1a85d2e1ba1c
Article author
@KathleenDollard
Metadata
- ID: f0c5b03c-2854-8462-57dc-b0239388096e
- PlatformId: 9b3f8cae-8b7a-768b-2e02-1a85d2e1ba1c
- Service: dotnet-fundamentals