Skip to content

[release/v7.6.6] Prepare for onboarding PowerShell to the Native2Native localization pipeline - #27916

Merged
Patrick Meinecke (SeeminglyScience) merged 1 commit into
PowerShell:release/v7.6.6from
SeeminglyScience:backport/release/v7.6.6/27667-855d94376
Sep 1, 2026
Merged

Patrick Meinecke (SeeminglyScience) merged 1 commit into
PowerShell:release/v7.6.6from
SeeminglyScience:backport/release/v7.6.6/27667-855d94376

Conversation

@SeeminglyScience

Copy link
Copy Markdown
Contributor

Backport of #27667 to release/v7.6.6

Triggered by Patrick Meinecke (@SeeminglyScience) on behalf of Dongbo Wang (@daxian-dbw)

Original CL Label: CL-BuildPackaging

/cc @PowerShell/powershell-maintainers

Impact

REQUIRED: Choose either Tooling Impact or Customer Impact (or both). At least one checkbox must be selected.

Tooling Impact

  • Required tooling change
  • Optional tooling change (include reasoning)

Sets up the Native2Native localization pipeline (LocProject.json) and removes unused resource/source files, required for onboarding PowerShell 7.6 to localization.

Customer Impact

  • Customer reported
  • Found internally

Regression

REQUIRED: Check exactly one box.

  • Yes
  • No

This is not a regression.

Testing

Verified the cherry-picked commit builds correctly with all unused files removed and csproj references cleaned up. Original PR updated ResourceValidation tests accordingly, which were carried over in this backport unchanged.

Risk

REQUIRED: Check exactly one box.

  • High
  • Medium
  • Low

Removes unused/dead code and resource files and adds localization pipeline configuration (LocProject.json). No behavioral changes to shipped cmdlets. Validated in master; risk is limited to build/packaging correctness rather than runtime behavior.

Merge Conflicts

Files deleted by the original PR (ControlPanelItemCommand.cs, Eventlog.cs, WebServiceProxy.cs, cmdlets-over-objects.xmlSerializer.autogen.cs) conflicted because the release branch had unrelated trivial diagnostic/whitespace fixes applied since divergence. Accepted the deletions per the PR's intent (removing unused files). Microsoft.PowerShell.Commands.Utility.csproj and System.Management.Automation.csproj had conflicts where the release branch pins different package versions (Microsoft.CodeAnalysis.CSharp 5.0.0 vs 5.6.0, System.Drawing.Common 10.0.5 vs 11.0.0-preview) and has an extra EmbeddedResource Include for cmdlets-over-objects.xsd from a prior backport; resolved by keeping the release branch's package versions and existing resource include, while applying the PR's removal of Compile Remove/EmbeddedResource Remove entries for the now-deleted files.

…ipeline (PowerShell#27667)

1. Create the `LocProject.json` file for PowerShell localization.
2. Remove the unused `.resx` resource files and source files.
3. Update the `ResourceValidation` tests.
Copilot AI lite review requested due to automatic review settings September 1, 2026 00:41
@SeeminglyScience Patrick Meinecke (SeeminglyScience) added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Sep 1, 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

Backports #27667 to release/v7.6.6 to prepare PowerShell for the Native2Native localization pipeline by adding localization project configuration and removing unused/dead resource + source files, while updating ResourceValidation tests to align with the cleaned-up resource set.

Changes:

  • Add Localize/LocProject.json to define the Native2Native localization inputs/outputs across key assemblies.
  • Remove unused .resx and legacy/unshipped .cs source files and simplify related .csproj exclusions.
  • Update ResourceValidation tests to stop excluding resources that are no longer present, and make Test-ResourceStrings’s ExcludeList optional.

Reviewed changes

Copilot reviewed 74 out of 100 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/powershell/engine/ResourceValidation/WSManResources.Tests.ps1 Removes now-unnecessary exclude list and standardizes $AssemblyName.
test/powershell/engine/ResourceValidation/UtilityResources.Tests.ps1 Removes exclude list and fixes module name casing (Microsoft.PowerShell.Utility).
test/powershell/engine/ResourceValidation/TestRunner.ps1 Makes AssemblyName mandatory and ExcludeList optional (default @()).
test/powershell/engine/ResourceValidation/SMAResources.Tests.ps1 Narrows exclusion to EventResource.resx with updated rationale.
test/powershell/engine/ResourceValidation/SecurityResources.Tests.ps1 Removes now-unnecessary exclude list and standardizes $AssemblyName.
test/powershell/engine/ResourceValidation/ManagementCommandsResources.Tests.ps1 Removes exclude list now that removed resources are gone.
test/powershell/engine/ResourceValidation/DotNetEventingResources.Tests.ps1 Removes empty exclude list and standardizes $AssemblyName.
test/powershell/engine/ResourceValidation/ConsoleHostResources.Tests.ps1 Removes exclude list now that removed resources are gone.
test/powershell/engine/ResourceValidation/CimCmdletsResources.Tests.ps1 Removes empty exclude list and standardizes $AssemblyName.
src/System.Management.Automation/utils/perfCounters/CounterSetRegistrarBase.cs Deletes unused perf-counter registrar implementation.
src/System.Management.Automation/utils/BackgroundDispatcher.cs Deletes unused background dispatcher implementation.
src/System.Management.Automation/System.Management.Automation.csproj Removes stale Compile Remove/EmbeddedResource Remove entries; keeps only gen\EventResource.cs exclusion.
src/System.Management.Automation/resources/ErrorPackageRemoting.resx Deletes unused resource file.
src/System.Management.Automation/resources/CoreMshSnapinResources.resx Deletes unused resource file.
src/System.Management.Automation/namespaces/TransactedRegistry.cs Deletes unused transacted registry helper.
src/System.Management.Automation/namespaces/SafeTransactionHandle.cs Deletes unused transaction handle wrapper.
src/System.Management.Automation/engine/TransactedString.cs Deletes unused transactional string type.
src/System.Management.Automation/engine/remoting/commands/ResumeJob.cs Deletes unused/unshipped cmdlet source.
src/System.Management.Automation/engine/hostifaces/RunspaceInvoke.cs Deletes unused/unshipped API surface in this branch’s build.
src/ResGen/Program.cs Makes Program a static class.
src/Microsoft.WSMan.Management/WsManSnapin.cs Deletes unused snap-in implementation.
src/Microsoft.WSMan.Management/Microsoft.WSMan.Management.csproj Removes now-stale Compile Remove for deleted WsManSnapin.cs.
src/Microsoft.PowerShell.Security/singleshell/installer/MshSecurityMshSnapin.cs Deletes unused snap-in installer source.
src/Microsoft.PowerShell.Security/resources/SecurityMshSnapinResources.resx Deletes unused snap-in resource.
src/Microsoft.PowerShell.Security/Microsoft.PowerShell.Security.csproj Removes now-stale Compile Remove/EmbeddedResource Remove block.
src/Microsoft.PowerShell.LocalAccounts/Microsoft.PowerShell.LocalAccounts.csproj Removes unused/unbuilt LocalAccounts project from the tree.
src/Microsoft.PowerShell.LocalAccounts/LocalAccounts/StringUtil.cs Deletes unused LocalAccounts source.
src/Microsoft.PowerShell.LocalAccounts/LocalAccounts/PInvokeDllNames.cs Deletes unused LocalAccounts source.
src/Microsoft.PowerShell.LocalAccounts/LocalAccounts/LocalUser.cs Deletes unused LocalAccounts source.
src/Microsoft.PowerShell.LocalAccounts/LocalAccounts/LocalPrincipal.cs Deletes unused LocalAccounts source.
src/Microsoft.PowerShell.LocalAccounts/LocalAccounts/LocalGroup.cs Deletes unused LocalAccounts source.
src/Microsoft.PowerShell.LocalAccounts/LocalAccounts/Extensions.cs Deletes unused LocalAccounts source.
src/Microsoft.PowerShell.LocalAccounts/LocalAccounts/Commands/SetLocalGroupCommand.cs Deletes unused LocalAccounts cmdlet source.
src/Microsoft.PowerShell.LocalAccounts/LocalAccounts/Commands/RenameLocalUserCommand.cs Deletes unused LocalAccounts cmdlet source.
src/Microsoft.PowerShell.LocalAccounts/LocalAccounts/Commands/RenameLocalGroupCommand.cs Deletes unused LocalAccounts cmdlet source.
src/Microsoft.PowerShell.LocalAccounts/LocalAccounts/Commands/RemoveLocalUserCommand.cs Deletes unused LocalAccounts cmdlet source.
src/Microsoft.PowerShell.LocalAccounts/LocalAccounts/Commands/RemoveLocalGroupCommand.cs Deletes unused LocalAccounts cmdlet source.
src/Microsoft.PowerShell.LocalAccounts/LocalAccounts/Commands/NewLocalGroupCommand.cs Deletes unused LocalAccounts cmdlet source.
src/Microsoft.PowerShell.LocalAccounts/LocalAccounts/Commands/GetLocalUserCommand.cs Deletes unused LocalAccounts cmdlet source.
src/Microsoft.PowerShell.LocalAccounts/LocalAccounts/Commands/GetLocalGroupMemberCommand.cs Deletes unused LocalAccounts cmdlet source.
src/Microsoft.PowerShell.LocalAccounts/LocalAccounts/Commands/GetLocalGroupCommand.cs Deletes unused LocalAccounts cmdlet source.
src/Microsoft.PowerShell.LocalAccounts/LocalAccounts/Commands/EnableLocalUserCommand.cs Deletes unused LocalAccounts cmdlet source.
src/Microsoft.PowerShell.LocalAccounts/LocalAccounts/Commands/DisableLocalUserCommand.cs Deletes unused LocalAccounts cmdlet source.
src/Microsoft.PowerShell.ConsoleHost/singleshell/installer/MshHostMshSnapin.cs Deletes unused snap-in installer source.
src/Microsoft.PowerShell.ConsoleHost/singleshell/installer/EngineInstaller.cs Deletes unused installer source.
src/Microsoft.PowerShell.ConsoleHost/resources/HostMshSnapinResources.resx Deletes unused snap-in resource.
src/Microsoft.PowerShell.ConsoleHost/Microsoft.PowerShell.ConsoleHost.csproj Removes now-stale Compile Remove/EmbeddedResource Remove block.
src/Microsoft.PowerShell.Commands.Utility/singleshell/installer/MshUtilityMshSnapin.cs Deletes unused snap-in installer source.
src/Microsoft.PowerShell.Commands.Utility/resources/UtilityMshSnapinResources.resx Deletes unused snap-in resource.
src/Microsoft.PowerShell.Commands.Utility/resources/ImmutableStrings.resx Deletes unused resource file.
src/Microsoft.PowerShell.Commands.Utility/resources/ConvertStringResources.resx Deletes unused resource file.
src/Microsoft.PowerShell.Commands.Utility/resources/ConvertFromStringResources.resx Deletes unused resource file.
src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj Removes now-stale Compile Remove/EmbeddedResource Remove block.
src/Microsoft.PowerShell.Commands.Management/singleshell/installer/MshManagementMshSnapin.cs Deletes unused snap-in installer source.
src/Microsoft.PowerShell.Commands.Management/resources/WmiResources.resx Deletes unused resource file.
src/Microsoft.PowerShell.Commands.Management/resources/WebServiceResources.resx Deletes unused resource file.
src/Microsoft.PowerShell.Commands.Management/resources/TransactionResources.resx Deletes unused resource file.
src/Microsoft.PowerShell.Commands.Management/resources/ManagementMshSnapInResources.resx Deletes unused resource file.
src/Microsoft.PowerShell.Commands.Management/resources/ControlPanelResources.resx Deletes unused resource file.
src/Microsoft.PowerShell.Commands.Management/Microsoft.PowerShell.Commands.Management.csproj Removes now-stale Compile Remove/EmbeddedResource Remove block.
src/Microsoft.PowerShell.Commands.Management/commands/management/UseTransactionCommand.cs Deletes unused/unshipped transaction cmdlet source.
src/Microsoft.PowerShell.Commands.Management/commands/management/StartTransactionCommand.cs Deletes unused/unshipped transaction cmdlet source.
src/Microsoft.PowerShell.Commands.Management/commands/management/SetWMIInstanceCommand.cs Deletes unused/unshipped WMI cmdlet source.
src/Microsoft.PowerShell.Commands.Management/commands/management/RollbackTransactionCommand.cs Deletes unused/unshipped transaction cmdlet source.
src/Microsoft.PowerShell.Commands.Management/commands/management/RemoveWMIObjectCommand.cs Deletes unused/unshipped WMI cmdlet source.
src/Microsoft.PowerShell.Commands.Management/commands/management/RegisterWMIEventCommand.cs Deletes unused/unshipped WMI event cmdlet source.
src/Microsoft.PowerShell.Commands.Management/commands/management/GetTransactionCommand.cs Deletes unused/unshipped transaction cmdlet source.
src/Microsoft.PowerShell.Commands.Management/commands/management/CommitTransactionCommand.cs Deletes unused/unshipped transaction cmdlet source.
src/Microsoft.PowerShell.Commands.Diagnostics/Microsoft.PowerShell.Commands.Diagnostics.csproj Removes stale Compile Remove entries for deleted sources.
src/Microsoft.PowerShell.Commands.Diagnostics/GetEventSnapin.cs Deletes unused snap-in implementation.
src/Microsoft.PowerShell.Commands.Diagnostics/CounterFileInfo.cs Deletes unused type.
Localize/LocProject.json Adds Native2Native localization project configuration for PowerShell resources.

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

@SeeminglyScience
Patrick Meinecke (SeeminglyScience) merged commit 581679c into PowerShell:release/v7.6.6 Sep 1, 2026
39 checks passed
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.

4 participants