Fix build to remove PowerShell satellite assemblies properly - #27908
Merged
Dongbo Wang (daxian-dbw) merged 1 commit intoAug 31, 2026
Merged
Dongbo Wang (daxian-dbw) merged 1 commit into
Dongbo Wang (daxian-dbw) merged 1 commit into
Conversation
Dongbo Wang (daxian-dbw)
requested review from
a team and
Justin Chung (jshigetomi)
as code owners
August 31, 2026 18:43
|
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
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=ento 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.
Dongbo Wang (daxian-dbw)
merged commit Aug 31, 2026
1481b98
into
PowerShell:release/v7.7.0-preview.4
38 of 39 checks passed
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.
PR Summary
Update
Start-PSBuildto only produce localized resources (satellite assemblies) forwin7-x64,win7-x86, andwin-arm64by default. This is because we will only ship localized resources for MSIX package. For the rest packages, we only support the defaulten-US, because this can reduce the package size by27 mbtoday, and another8 mbafter PowerShell resources are localized.We applied
/property:SatelliteResourceLanguages=enin #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 knowDOTNET_SYSTEM_GLOBALIZATION_INVARIANTwas 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.