Repository navigation
Fix preview workload version search - #55685
Merged
marcpopMSFT merged 1 commit intoAug 10, 2026
Merged
Conversation
Treat a zero NuGet result count as unlimited for preview-inclusive queries, matching stable version behavior. Co-authored-by: Copilot App <[email protected]> Copilot-Session: ad8c4d3a-b669-4e52-bf34-a44016be0569
|
Azure Pipelines: Successfully started running 1 pipeline(s). 2 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes preview-inclusive workload version searches where a requested result count of 0 (meaning “all”) incorrectly returned zero results due to a Take(0) in the preview-inclusive query path.
Changes:
- Treat
numberOfResults == 0as “unlimited” consistently for both stable-only and preview-inclusive version queries. - Add a downloader-level test that builds a local feed containing preview packages and verifies all versions are returned in descending order.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| test/dotnet.Tests/NuGetPackageDownloaderTests.cs | Adds regression coverage for GetLatestPackageVersions(..., numberOfResults: 0, includePreview: true) using an isolated local feed. |
| src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs | Introduces a helper to apply the “0 means all” rule consistently across stable and preview-inclusive paths. |
Member
Author
|
Tested in codespace and was able to search a preview version of android |
marcpopMSFT
enabled auto-merge (squash)
August 10, 2026 21:23
nagilson
approved these changes
Aug 10, 2026
marcpopMSFT
deleted the
marcpopmsft-fix-preview-workload-version-search
branch
August 10, 2026 22:17
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.
Preview workload version searches such as
dotnet workload search version ios@<version>request all workload-set package versions by passing a result count of zero. The preview-inclusive NuGet query path interpreted that asTake(0), so it returned no candidates.Treat zero as unlimited consistently for both stable and preview-inclusive queries. Add downloader-level coverage with an isolated local feed containing preview packages to verify all versions are returned in descending order.