[release/v7.5.10] Backport Windows build pipeline fixes - #27813
Merged
Justin Chung (jshigetomi) merged 2 commits intoAug 11, 2026
Merged
Conversation
Backports the build fixes from mscodehub PRs 40633 and 40638 to `release/v7.6.4`. ## Scope - Replays PR 40633's prerequisite chain: PR 40625, PR 40632, then PR 40633. - Cherry-picks the current source commit from PR 40638 (`f507709e175428305a9bd17d816c0a1ab9b40c28`). - Changes only `tools/wix/wix.psm1` and `tools/packaging/packaging.psm1`. ## Changes - Ensures Microsoft.PowerShell.PSResourceGet 1.2.0 or newer is available, installing it from an explicitly registered PowerShell CFS v2 feed when necessary. - Adds `-sval` to the WiX `light.exe` invocation to skip ICE validation in CI. ## Source PRs - [40625](https://dev.azure.com/mscodehub/PowerShellCore/_git/PowerShell/pullrequest/40625) - [40632](https://dev.azure.com/mscodehub/PowerShellCore/_git/PowerShell/pullrequest/40632) - [40633](https://dev.azure.com/mscodehub/PowerShellCore/_git/PowerShell/pullrequest/40633) - [40638](https://dev.azure.com/mscodehub/PowerShellCore/_git/PowerShell/pullrequest/40638) ## Validation - Each backport commit has the same stable patch ID as its source commit. - Both changed PowerShell modules parse without errors. - The branch diff passes `git diff --check`. ## Repository boundary This branch and PR must remain in `mscodehub`; do not mirror or push this branch to GitHub before the PowerShell 7.6.4 release. ---- #### AI description (iteration 1) #### PR Classification Bug fixes for Windows build pipeline to resolve WiX tooling installation and MSI build validation issues. #### PR Summary This pull request addresses critical issues in the Windows build pipeline by fixing the WiX module installation process and MSI build validation. The changes ensure proper version checking for PSResourceGet module and suppress schema validation during MSI builds. - `/tools/wix/wix.psm1`: Added version check for PSResourceGet (minimum v1.2.0), implemented custom PSRepository registration for reliable module installation, and improved error handling with try-finally block - `/tools/packaging/packaging.psm1`: Added `-sval` flag to suppress schema validation during WiX Light execution to prevent build failures - `/tools/packaging/packaging.psm1`: Minor whitespace cleanup for code formatting consistency <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Justin Chung (jshigetomi)
marked this pull request as ready for review
August 11, 2026 15:20
|
Azure Pipelines: 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
Backport of Windows build pipeline fixes into release/v7.5.10, focused on making WiX/PSResourceGet acquisition more reliable in CI and suppressing WiX light.exe validation that can fail in constrained build environments.
Changes:
- Update WiX install flow to ensure
Microsoft.PowerShell.PSResourceGetis present at a minimum required version (installing from a dedicated feed when needed). - Update MSI build to pass
-svalto WiXlight.exeto suppress validation during linking. - Minor whitespace cleanup in packaging script.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tools/wix/wix.psm1 | Ensures PSResourceGet availability/version and installs from a registered feed when required. |
| tools/packaging/packaging.psm1 | Adds -sval to light.exe invocation to suppress validation during MSI linking. |
Suppressed comments (1)
tools/wix/wix.psm1:47
- Registering a fixed-name PSRepository and then unconditionally unregistering it can break environments where
powershell-cfsis already configured (it will be removed), andUnregister-PSRepositoryinfinallycan also throw if registration failed, masking the real error. Consider using a unique temporary repository name and unregister it with-ErrorAction SilentlyContinue. Also, to meet the stated requirement, enforce a minimum version during install.
Register-PSRepository -Name 'powershell-cfs' -SourceLocation 'https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/PowerShell/nuget/v2' -InstallationPolicy Trusted
Install-Module -Name 'Microsoft.PowerShell.PSResourceGet' -Force -AllowClobber -Scope CurrentUser -Repository 'powershell-cfs'
}
finally {
Unregister-PSRepository -Name 'powershell-cfs'
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
|
||
| if (-not $psresourceGet) { | ||
| Install-Module -Name 'Microsoft.PowerShell.PSResourceGet' -Force -AllowClobber -Scope CurrentUser | ||
| $psresourceGet = Get-Module -ListAvailable -Name 'Microsoft.PowerShell.PSResourceGet' -ErrorAction SilentlyContinue | Select-Object -First 1 |
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.
Backports the build fixes from mscodehub PRs 40633 and 40638 to
release/v7.5.10.Scope
f507709e175428305a9bd17d816c0a1ab9b40c28).tools/wix/wix.psm1andtools/packaging/packaging.psm1.Changes
-svalto the WiXlight.exeinvocation to skip ICE validation in CI.Source PRs
Validation
git diff --check.Repository boundary
This branch and PR must remain in
mscodehub; do not mirror or push this branch to GitHub before the PowerShell 7.6.4 release.AI description (iteration 1)
PR Classification
Bug fixes for Windows build pipeline to resolve WiX tooling installation and MSI build validation issues.
PR Summary
This pull request addresses critical issues in the Windows build pipeline by fixing the WiX module installation process and MSI build validation. The changes ensure proper version checking for PSResourceGet module and suppress schema validation during MSI builds.
/tools/wix/wix.psm1: Added version check for PSResourceGet (minimum v1.2.0), implemented custom PSRepository registration for reliable module installation, and improved error handling with try-finally block/tools/packaging/packaging.psm1: Added-svalflag to suppress schema validation during WiX Light execution to prevent build failures/tools/packaging/packaging.psm1: Minor whitespace cleanup for code formatting consistencyPR Summary
PR Context
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright header