Skip to content

[release/v7.5.10] Backport Windows build pipeline fixes - #27813

Merged
Justin Chung (jshigetomi) merged 2 commits into
release/v7.5.10from
bringWindowsBuildFixes
Aug 11, 2026
Merged

Justin Chung (jshigetomi) merged 2 commits into
release/v7.5.10from
bringWindowsBuildFixes

Conversation

@jshigetomi

Copy link
Copy Markdown
Collaborator

Backports the build fixes from mscodehub PRs 40633 and 40638 to release/v7.5.10.

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

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

PR Summary

PR Context

PR Checklist

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

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@jshigetomi
Justin Chung (jshigetomi) marked this pull request as ready for review August 11, 2026 15:20
@jshigetomi
Justin Chung (jshigetomi) requested a review from a team as a code owner August 11, 2026 15:20
Copilot AI lite review requested due to automatic review settings August 11, 2026 15:20
@jshigetomi Justin Chung (jshigetomi) added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Aug 11, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.PSResourceGet is present at a minimum required version (installing from a dedicated feed when needed).
  • Update MSI build to pass -sval to WiX light.exe to 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-cfs is already configured (it will be removed), and Unregister-PSRepository in finally can 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.

Comment thread tools/wix/wix.psm1

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
@jshigetomi
Justin Chung (jshigetomi) merged commit 14759a4 into release/v7.5.10 Aug 11, 2026
37 checks passed
@jshigetomi
Justin Chung (jshigetomi) deleted the bringWindowsBuildFixes branch August 17, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants