web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / Cup of Dev / Quick Tip : Display the fil...

Quick Tip : Display the file version of your application in C#

Morne Wolfaardt Profile Picture Morne Wolfaardt

Quick Tip : Display the file version of your application in C#

To be able to display the version of your application can be very helpful, especially if you do support on the product and you need to find out what version the user is running.

Version numbers typically display as major number.minor number.build number.private part number

By using Application.ProductVersion you can quickly display the file version of the assembly.


private void PrintProductVersion() {
textBox1.Text = "The product version is: " +
Application.ProductVersion;
}

 

How to set the file version of your application

Right click on the project

Click on the Assembly Information…

Assembly info

 

 

File Version

 

Set the File Version

 

More about software versioning:

https://en.wikipedia.org/wiki/Software_versioning

https://msdn.microsoft.com/en-us/library/system.windows.forms.application.productversion(v=vs.110).aspx

Email Newsletter

Missing out on the latest Cupofdev.com developments? Enter your email below to receive future announcements direct to your inbox. An email confirmation will be sent before you will start receiving notifications - please check your spam folder if you don't receive this.

Email Address

The post Quick Tip : Display the file version of your application in C# appeared first on Cup of dev - A blog for developers by Morne Wolfaardt.


This was originally posted here.

Comments

*This post is locked for comments