Skip to content

Fix build to remove PowerShell satellite assemblies properly - #27908

Merged
Dongbo Wang (daxian-dbw) merged 1 commit into
PowerShell:release/v7.7.0-preview.4from
daxian-dbw:fix-build
Aug 31, 2026
Merged

Dongbo Wang (daxian-dbw) merged 1 commit into
PowerShell:release/v7.7.0-preview.4from
daxian-dbw:fix-build

Conversation

@daxian-dbw

Copy link
Copy Markdown
Member

PR Summary

Update Start-PSBuild to only produce localized resources (satellite assemblies) for win7-x64, win7-x86, and win-arm64 by default. This is because we will only ship localized resources for MSIX package. For the rest packages, we only support the default en-US, because this can reduce the package size by 27 mb today, and another 8 mb after PowerShell resources are localized.

We applied /property:SatelliteResourceLanguages=en in #27725, but it turned out that can only suppress the package/runtime assets, not the PowerShell satellite assemblies produced in the build. It was not caught because when validating the changes in Coordinate Binaries build and Package build, I didn't know DOTNET_SYSTEM_GLOBALIZATION_INVARIANT was set at the pipeline level, which prevents the PowerShell satellite assemblies from being produced.

A more reliable solution is to explicitly remove all PowerShell satellite assemblies after the build, if we are not supposed to include them for the build.

Copilot AI lite review requested due to automatic review settings August 31, 2026 18:43
@azure-pipelines

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

@daxian-dbw Dongbo Wang (daxian-dbw) added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Aug 31, 2026

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

This PR updates the Start-PSBuild publish flow to ensure PowerShell satellite assemblies (localized resource assemblies) are only produced/retained for MSIX-targeted Windows RIDs by default, and removed for other builds to reduce shipped package size.

Changes:

  • Adds logic to detect when localized resources should be suppressed and, in that case, remove PowerShell satellite assembly directories from the publish output.
  • Keeps /property:SatelliteResourceLanguages=en to limit package/runtime assets while adding an explicit post-build cleanup for PowerShell-produced satellites.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread build.psm1
@daxian-dbw
Dongbo Wang (daxian-dbw) merged commit 1481b98 into PowerShell:release/v7.7.0-preview.4 Aug 31, 2026
38 of 39 checks passed
@daxian-dbw
Dongbo Wang (daxian-dbw) deleted the fix-build branch August 31, 2026 19:23
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