NuGet/Home

--protocolVersion argument description isn't accurate about the default value

Open

#14.008 aperta il 18 dic 2024

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)HTML (292 fork)batch import
Priority:3Product:dotnet.exeType:Bughelp wanted

Metriche repository

Star
 (1459 star)
Metriche merge PR
 (Merge medio 464g 23h) (1 PR mergiata in 30 g)

Descrizione

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

Guida contributor