I am trying to get the file version using C #:
string file = @"C:\somefile.dll";
Console.WriteLine(FileVersionInfo.GetVersionInfo(file).FileVersion);
For most files, this is normal, but for some, I get results that are different from those presented in the Windows file explorer.
See the attached image: the version of the file presented in the windows is "0.0.0.0", however the one I got using the FileVersion property is "000.000.000.000".
I tried using different versions of .NET (2, 3.5, 4) that give the same results.
Has anyone else experienced this issue?
Thanks lior

source
share