c# 4.0 - How to get .exe file version number from file path - Stack Overflow

PHOTO EMBED

Mon Feb 27 2023 05:14:51 GMT+0000 (Coordinated Universal Time)

Saved by @javicinhio #cs

using System.Reflection;

infoFileVersionInfo versInfo = FileVersionInfo.GetVersionInfo("path.exe");
string version = $"v{versInfo.FileMajorPart}.{versInfo.FileMinorPart}.{versInfo.FileBuildPart}";
content_copyCOPY

https://stackoverflow.com/questions/11350008/how-to-get-exe-file-version-number-from-file-path