I try to use file version C #:
string file = @ I am doing "C: \ somefile.dll"; Console.WriteLine (FileVersionInfo.GetVersionInfo (file) .FileVersion); For most files this is fine, although for some I have received the results that are different from the results presented in the Windows File Explorer.
See the attached image: The file version presented in Windows is "0.0.0.0", however, I am using a FileVision property "000.000.000.000"
I have .NET (2, 3.5, 4) that give similar results.
Has anyone else experienced this problem?
Thanks Lior
It seems that the leading parts of Windows Explorer version parts are different.
Try creating an assembly with FileVersion 001.001.001.001, it will be shown in Explorer as 1.1.1.1. But your code will return the actual value (001.001.001.001).
Edit:
The Explorer will return 001.001.001.001 to ProductVersion , but only if AssemblyInformationalVersion is not set In that case, he will return as a product.
Comments
Post a Comment