dotnet list package works with unlisted and prerelease packages#7038
Merged
dotnet list package works with unlisted and prerelease packages#7038
Conversation
martinrrm
previously approved these changes
Jan 9, 2026
Contributor
martinrrm
left a comment
There was a problem hiding this comment.
LGTM, thanks for adding the infrastructure to the tests
0117e57 to
057bd9b
Compare
057bd9b to
5d6ba70
Compare
martinrrm
approved these changes
Jan 12, 2026
jeffkl
approved these changes
Jan 13, 2026
nkolev92
approved these changes
Jan 14, 2026
This was referenced Jan 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
Fixes: NuGet/Home#14477
Description
I assume that
dotnet list packagesupported checking for deprecated and vulnerable packages sometime after it supported checking for outdated packages, because some of the method names were different to what they were actually doing, plus the code to get package metadata from package sources wouldn't get metadata about unlisted or prerelease packages, even if the project was using those packages. So, it was changed to always get metadata about prerelease and unlisted packages, and the outdated report was updated to filter out the unlisted packages.There was some test infrastructure fixes as well. Since commands like
dotnet add packagerun msbuild as a child process before running NuGet's main logic for the command, these child processes were failing because the child process was using the system installed dotnet, rather than the test dotnet, and global.json was forcing it to use a specific version of the sdk. Adding the test dotnet to the path fixed it, allowing--format jsonto capture and parse json, making validation less fragile from variable space issues.Also needed to add support for vulnerability info on registration pages to the mock server.
PR Checklist