--protocolVersion argument description isn't accurate about the default value
#14,008 opened on 2024年12月18日
説明
NuGet Product Used
dotnet.exe
Product Version
.NET 9.0.0
Worked before?
documentation issue
Impact
It bothers me. A fix would be nice
Repro Steps & Context
The description of the --protocolVersion argument isn't accurate when we do the command dotnet nuget add source --help. Currently it's
The NuGet server protocol version to be used. Currently supported versions are 2 and 3. See https://learn.microsoft.com/nuget/api/overview for information about the version 3 protocol. Defaults to 2 if not specified.
But if we refer to https://learn.microsoft.com/en-us/nuget/reference/nuget-config-file official documentation, we can read this:
The NuGet server protocol version to be used. The current version is "3". Defaults to version "2" when not pointing to a package source URL ending in .json (e.g. https://api.nuget.org/v3/index.json). Supported in NuGet 3.0+. See NuGet Server API for more information about the version 3 protocol.
The misleading here reside in the default value. When we are reading the description of nuget command line help, it says that it defaults to value 2 if there is nothing. But in the end it's not true if the source URL ending in .json according to the official documentation.
I think the description in help command should be more accurate about the default value.
Verbose Logs
No response