How do I retrieve the Major and Minor application (assembly) version and the Build and Revision number?

How do I retrieve the Major and Minor application (assembly) version and the Build and Revision number

You can nicely retrieve the major and minor version of your application by using the Version class to retrieve and decode the version from the assembly.



Version vrs = new Version(Application.ProductVersion);
MessageBox.Show(“Major: ” + vrs.Major + “\r\nMinor: ” + vrs.Minor);

Also, you can get the build and revision number using the rest of the properties:

Version vrs = new Version(Application.ProductVersion);
MessageBox.Show(“Build: ” + vrs.Build + “\r\nRevision: ” + vrs.Revision);

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top