mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
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 -->