Skip to content

Fix duplicate ProductVersion SHA#27191

Open
badgerbees wants to merge 1 commit intoPowerShell:masterfrom
badgerbees:fix/productversion-duplicate-sha
Open

Fix duplicate ProductVersion SHA#27191
badgerbees wants to merge 1 commit intoPowerShell:masterfrom
badgerbees:fix/productversion-duplicate-sha

Conversation

@badgerbees
Copy link
Copy Markdown

PR Summary

This PR removes the duplicated commit SHA from VersionInfo.ProductVersion in PowerShell PE files by disabling the .NET SDK's automatic source revision suffix.

PR Context

PowerShell already formats ProductVersion with its own git-derived version string in PowerShell.Common.props. The .NET SDK was appending SourceRevisionId a second time, which caused the PE version resource to show the SHA twice. This change keeps the existing PowerShell version formatting and prevents the extra suffix from being added.

PR Checklist

@badgerbees badgerbees requested review from a team and jshigetomi as code owners April 5, 2026 20:39
Copilot AI review requested due to automatic review settings April 5, 2026 20:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 prevents the .NET SDK from automatically appending the repository source revision to InformationalVersion, avoiding a duplicated commit SHA in the resulting PE file version metadata while preserving PowerShell’s existing git-derived version formatting.

Changes:

  • Disables the .NET SDK “source revision suffix” behavior by setting IncludeSourceRevisionInInformationalVersion=false.
  • Keeps InformationalVersion / ProductVersion aligned with $(PSCoreFormattedVersion) produced by PowerShell’s existing git version logic.

Copy link
Copy Markdown

@sharktide sharktide left a comment

Choose a reason for hiding this comment

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

LGTM

@microsoft-github-policy-service
Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

@microsoft-github-policy-service microsoft-github-policy-service bot added the Review - Needed The PR is being reviewed label Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Review - Needed The PR is being reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants