PowerShell / PowerShell/PowerShell
ProductVersion of pwsh.exe lists Git commit ID twice
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 55.5k
- Forks
- 8.5k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 88
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
The ProductVersion string in the version resource of almost every PowerShell PE file lists the same Git commit ID twice, separated with a plus sign. Just once would be enough.
(However, that does not apply to Microsoft.PowerShell.MarkdownRender.dll, where the ProductVersion is just 7.2.1.)
Expected behavior
PS> (Get-Item "${PSHOME}/pwsh.exe").VersionInfo.ProductVersion
7.6.0 SHA: 6effea0e216b190f989e227f5a20b670804a07fb
PS> (Get-Item "${PSHOME}/pwsh.dll").VersionInfo.ProductVersion
7.6.0 SHA: 6effea0e216b190f989e227f5a20b670804a07fb
PS> (Get-Item "${PSHOME}/System.Management.Automation.dll").VersionInfo.ProductVersion
7.6.0 SHA: 6effea0e216b190f989e227f5a20b670804a07fb
PS> Get-Item "${PSHOME}/*.dll","${PSHOME}/*.exe" | Where-Object { $_.VersionInfo.ProductName -like '*PowerShell*' } | Group-Object { $_.VersionInfo.ProductName},{ $_.VersionInfo.ProductVersion } | Select-Object Count,Name
Count Name
----- ----
14 PowerShell, 7.6.0 SHA: 6effea0e216b190f989e227f5a20b670804a07fb
1 PowerShell Markdown Renderer, 7.2.1
Actual behavior
PS> (Get-Item "${PSHOME}/pwsh.exe").VersionInfo.ProductVersion
7.6.0 SHA: 6effea0e216b190f989e227f5a20b670804a07fb+6effea0e216b190f989e227f5a20b670804a07fb
PS> (Get-Item "${PSHOME}/pwsh.dll").VersionInfo.ProductVersion
7.6.0 SHA: 6effea0e216b190f989e227f5a20b670804a07fb+6effea0e216b190f989e227f5a20b670804a07fb
PS> (Get-Item "${PSHOME}/System.Management.Automation.dll").VersionInfo.ProductVersion
7.6.0 SHA: 6effea0e216b190f989e227f5a20b670804a07fb+6effea0e216b190f989e227f5a20b670804a07fb
PS> Get-Item "${PSHOME}/*.dll","${PSHOME}/*.exe" | Where-Object { $_.VersionInfo.ProductName -like '*PowerShell*' } | Group-Object { $_.VersionInfo.ProductName},{ $_.VersionInfo.ProductVersion } | Select-Object Count,Name
Count Name
----- ----
14 PowerShell, 7.6.0 SHA: 6effea0e216b190f989e227f5a20b670804a07fb+6effea0e216b190f989e227f5a20b670804a07fb
1 PowerShell Markdown Renderer, 7.2.1
Error details
Environment data
Name Value
---- -----
PSVersion 7.6.0
PSEdition Core
GitCommitId 7.6.0
OS Microsoft Windows 10.0.26200
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.4
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visuals
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names pwsh.exe, pwsh.dll, and System.Management.Automation.dll but no source file or test; start by tracing the build or version-resource entry point that produces their ProductVersion values. Reproduce with the shown Get-Item commands and consider the work done when PowerShell binaries report the commit ID once while Microsoft.PowerShell.MarkdownRender.dll remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- build-system, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100