Open HaGGi13 opened 1 week ago
If the goal is just to list the versions of a package that is available, you can achieve it with dotnet package search Some.Package --exact-match
.
If the goal is just to list the versions of a package that is available, you can achieve it with
dotnet package search Some.Package --exact-match
.
Hi @zivkan, thanks for your reply.
Yes, I know, but as I wrote in the additional context section, no dotnet CLI or similar. Only the NuGet CLI, nothing else.
NuGet Product(s) Affected
NuGet.exe
Current Behavior
When it's needed to know which package versions incl. pre-release versions are available within a private package feed, the command
nuget list id:<searched-package>
with parameters-Source
,-AllVersions
and-PreRelease
is run.Meaning, for instance, following is executed to get all versions incl. pre-release versions of the package
MyPackage
of a private package feed listed. For simplicity the command and the result are presented as a codeblock:As the NuGet protocol v2 is deprecated since many years, it's disabled on the private feed as well. Because of that the internal redirect of the NuGet CLI -- it's a guess that's the client and not the server does the redirect, because v2 is disabled service side -- the original output is following:
Desired Behavior
The command
nuget list
should be able to handle NuGet protocol v3 feeds directly instead of being depended of v2 redirects. Meaning, a source can be a v2 or a v3 feed, but the result will be the same and no error is printed.Additional Context
It's defined that the NuGet.exe is available only, no dotnet cli, no VS PMC or similar. Because of that the set of possibilities/approaches/solutions are limited to the NuGet CLI capabilities, and additional parsing to PowerShell 5.1 capabilities.
The command
nuget list
output is needed to check if a specific version of a package is already available in a (private) package feed. If it's not available yet, the package must be published, even if the version to publish is older/lower than the latest stable or pre-release version.To determine this, the result of
nuget list
is parsed with PowerShell (5.1).It was considered to use
nuget search
instead, but it does not provide a list of all available package versions incl. pre-release versions. So the decision was made to create this behavior change request.Instead of changing command
list
behavior, it would be another solution to extend the commandsearch
instead to list all available versions likelist
do. As far as it was possible to figure out during researches,search
should already get all this information, but doesn't print it.Any help on that is appreciated.