Fix workload advertising manifest extraction with WiX v4+ built MSIs - #55576
Open
marcpopMSFT with Copilot wants to merge 2 commits into
Open
Fix workload advertising manifest extraction with WiX v4+ built MSIs#55576marcpopMSFT with Copilot wants to merge 2 commits into
marcpopMSFT with Copilot wants to merge 2 commits into
Conversation
|
Azure Pipelines: 3 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix advertising manifest update issue for .NET 11.0.100-preview.7.26379.122
Fix workload advertising manifest extraction with WiX v4+ built MSIs
Aug 3, 2026
joeloff
approved these changes
Aug 4, 2026
joeloff
left a comment
Member
There was a problem hiding this comment.
This is fine. WiX4 introduced a new StandardDirectory that is used to eliminate authoring custom conditionals to select the appropriate ProgramFiles folder. This adds an additional entry in the directory table which is what the SDK is hitting. Since we have a mix of both v3 and v4+ built installers for workloads, we should take this fix
marcpopMSFT
marked this pull request as ready for review
August 4, 2026 23:48
|
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
Fixes dotnet workload install advertising-manifest refresh on Windows MSI-based installs when the admin-image layout differs (WiX v4+/v5 adding a PFiles* directory level), avoiding a hardcoded msi\dotnet\sdk-manifests assumption.
Changes:
- Updates
WindowsMsiManifestInstaller.ExtractManifestAsyncto locate the extractedsdk-manifestsfolder via a new helper instead of a fixed path. - Adds
FindExtractedManifestFolderto search for the admin-image manifest layout across WiX variants and returnnullwhen not found. - Adds Windows-only tests covering WiX v3 layout, WiX v4+ layout, and missing-manifest cases.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Cli/dotnet/Commands/Workload/Install/WindowsMsiManifestInstaller.cs | Adds helper to locate sdk-manifests under MSI admin-image output and uses it during extraction. |
| test/dotnet.Tests/CommandTests/Workload/Install/GivenAWindowsMsiManifestInstaller.cs | Adds unit tests validating the helper against WiX v3 vs v4+ layouts and not-found behavior. |
Comment on lines
+172
to
+176
| string? manifestsFolder = Directory.EnumerateDirectories(msiExtractionPath, "sdk-manifests", SearchOption.AllDirectories).FirstOrDefault(); | ||
| if (manifestsFolder == null) | ||
| { | ||
| return null; | ||
| } |
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.
On MSI-based installs,
dotnet workload installfails to refresh themicrosoft.net.workloadsadvertising manifest and silently falls back to stale manifests:Root cause
Workload set packages don't ship a
data\extractedManifestfolder (manifest MSI packages do), soWindowsMsiManifestInstaller.ExtractManifestAsyncfalls back to an administrative install —ACTION=ADMIN TARGETDIR=<tmp>\msi— and then reads a hardcoded<tmp>\msi\dotnet\sdk-manifests.Workload MSI generation moved from WiX v3 to WiX v5, which changed the MSI
Directorytable and therefore the admin-image layout:DirectorytableProgramFiles64Folder | TARGETDIR | .<tmp>\msi\dotnet\sdk-manifests\...ProgramFiles6432Folder | ProgramFiles64Folder | .ProgramFiles64Folder | TARGETDIR | PFiles64<tmp>\msi\PFiles64\dotnet\sdk-manifests\...(Confirmed by exporting the
Directorytable from the shipped preview.6 and preview.7 workload MSIs.) During an administrative install directories are resolved fromTARGETDIRusingDefaultDir, so the v3.collapsed away while v5 adds aPFiles64level. The hardcoded path then throwsDirectoryNotFoundException. Zip/tar installs are unaffected — they never touch an MSI.Changes
WindowsMsiManifestInstaller: newFindExtractedManifestFolderhelper locatessdk-manifestsby name under the admin-install target rather than assuming a fixed depth, so both layouts work (andPFilesvsPFiles64across architectures). The existing "descend two single-child levels" behavior is unchanged.ExpectedSingleManifestGracefulExceptionis raised instead of an unhandledDirectoryNotFoundException.Notes for reviewers
Compile Removeelsewhere), so they compile and run on Windows CI only.WorkloadSetMsiemitdata\extractedManifestlikeWorkloadManifestMsidoes — would remove the admin-install dependency entirely, but is out of scope for this repo.