Repository navigation
[build] Skip empty preview platform in WorkloadDependencies.json - #13557
Merged
Merged
Conversation
When no AndroidBuildApiLevel is Unstable (for example after GA), MSBuild batching over the empty _AndroidPreviewPlatformId item list still made one --preview-platform-version= argument with no value. The tool then wrote an optional platforms;android- entry, which is not an installable Android SDK package. Add a condition to the item so no argument is made for empty values, and make the tool ignore empty --preview-platform-version values. Context: dotnet/dotnet#10985 (comment) Co-authored-by: Copilot App <[email protected]>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the change to omit blank Android preview-platform dependencies.
No open issues 🎉
What changed in this PR
Prevents the workload dependency generator from emitting an invalid platforms;android- package entry when no preview Android platform is configured.
Changes:
- Omit the preview-platform argument in MSBuild when its item value is empty.
- Ignore empty or whitespace-only preview-platform values in the command-line parser, while preserving valid previews.
| File | Description |
|---|---|
tools/workload-dependencies/WorkloadDependencies.proj |
Guards preview argument generation against empty item values. |
tools/workload-dependencies/Program.cs |
Filters blank preview versions before adding them to the dependency list. |
Review effort: Balanced
simonrozsival
approved these changes
Nov 13, 2026
jonathanpeppers
deleted the
jonathanpeppers-fix-empty-preview-platform
branch
November 16, 2026 16:08
Member
Author
|
/backport to release/11.0.1xx |
Contributor
|
Started backporting to |
jonathanpeppers
added a commit
that referenced
this pull request
Nov 17, 2026
…13557) (#13575) When no AndroidBuildApiLevel is Unstable (for example after GA), MSBuild batching over the empty _AndroidPreviewPlatformId item list still made one --preview-platform-version= argument with no value. The tool then wrote an optional platforms;android- entry, which is not an installable Android SDK package. Add a condition to the item so no argument is made for empty values, and make the tool ignore empty --preview-platform-version values. Context: dotnet/dotnet#10985 (comment) Co-authored-by: Jonathan Peppers <[email protected]> Co-authored-by: Copilot App <[email protected]>
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.
Context: dotnet/dotnet#10985 (comment)
On
release/11.0.1xx, API 37 is now stable, so noAndroidBuildApiLevelhasUnstable=trueandAndroidPreviewPlatformIdsis empty. InWorkloadDependencies.proj, the argument--preview-platform-version=%(_AndroidPreviewPlatformId.Identity)uses batching. When the item list is empty, MSBuild still makes one bucket with an empty value, so the tool gets--preview-platform-version=. The tool then writes this optional entry:{ "desc": "Android SDK Platform (Preview)", "sdkPackage": { "id": "platforms;android-" }, "optional": "true" }platforms;android-is not an installable Android SDK package.Changes:
WorkloadDependencies.proj: add a condition, so no argument is made for an empty value.Program.cs: ignore empty--preview-platform-versionvalues.After this merges, it must also be backported to
release/11.0.1xx.Testing:
A,Bmakes two arguments.dotnet run --project tools/workload-dependencies/workload-dependencies.csproj ... --platform-version=android-37.0 --preview-platform-version=: output has onlyplatforms;android-37.0.--preview-platform-version=CinnamonBun: output still has theplatforms;android-CinnamonBunpreview entry.