Unable to get `FileVersionInfo` data from exe
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- csharp
- Domain
- desktop, operating-systems
Research direction
Start with the FileVersionInfo.GetVersionInfo call and reproduce the behavior using TeamViewerQS_x64.exe on Windows 10 or 11. Compare the fields returned by the API with those shown in Windows Explorer, including the possibility of string encoding in the NSIS executable. Done means ProductName and LegalCopyright are returned while the existing version integers remain correct.
Written by the indexing model from the issue text.
Description
Description
When looking at the System.Diagnostics.FileVersionInfo output for the TeamViewer Quicksupport executable, I get all empty strings for fields like ProductName and LegalCopyright, while they do in fact exist, according to Windows Explorer:
Reproduction Steps
This code will get a path to TeamViewerQS_x64.exe (see description above for download link), and print to console some of the properties from the file version info.
// Get path to downloads folder and TeamViewerQS_x64.exe
var userPath = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
var downloadsPath = Path.Combine(userPath, "Downloads");
var exePath = Path.Combine(downloadsPath, "TeamViewerQS_x64.exe");
// Get file version info and print to console
var fvi = FileVersionInfo.GetVersionInfo(exePath);
Console.WriteLine($"version major = {fvi.ProductMajorPart}");
Console.WriteLine($"version minor = {fvi.ProductMinorPart}");
Console.WriteLine($"product name = \"{fvi.ProductName}\"");
Console.WriteLine($"copyright = \"{fvi.LegalCopyright}\"");
Expected behavior
The expected output of the example code above should be (according to Windows Explorer):
version major = 15
version minor = 60
product name = "TeamViewer QS"
copyright = "TeamViewer"
Actual behavior
The actual output of the example code is:
version major = 15
version minor = 60
product name = ""
copyright = ""
Interesting to note is the version integers are correct.
Regression?
No response
Known Workarounds
No response
Configuration
I tried this on Windows 11, both .Net 8.0.400 and .Net 9.0.100. It also happens on Windows 10.
Other information
Considering the version integers are correct, perhaps this is some kind of string encoding issue? It appears that the TeamViewer QuickSupport exe is a compiled NSIS program, which may be relevant in helping to narrow this down.
- Dominant language
- C#
- Stars
- 18.3k
- Forks
- 5.6k
- PR merge metrics
- PR metrics pending
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.
More from dotnet/runtime
-
agentic-workflows untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
area-System.Reflection blocking-clean-ci-optional Known Build Error os-mac-os-x untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
area-CodeGen-coreclr untriaged
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
agentic-workflows untriaged
Difficulty 1/5 Under an hour Newbie friendliness 78/100
-
area-VM-meta-mono untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SubtitleEdit/subtitleedit#15108 · 1 comment ·
-
area/docs-content Bug pulumi/docs
Difficulty 1/5 1-3 hours Newbie friendliness 94/100
-
Create parent directories only after the containment check in InstallHelper.TryExtractToDirectory Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PowerShell/PSResourceGet#2056 ·