Here is a sample code to get assembly file version in C#.
Another approach is,
- System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();
- System.Diagnostics.FileVersionInfo fvi = System.Diagnostics.FileVersionInfo.GetVersionInfo(assembly.Location);
- string version = fvi.FileVersion;
Another approach is,
This approach requires reference to below namespace.
- var version = Application.ProductVersion;
- System.Windows.Forms
No comments:
Post a Comment