Connect with Expertise | Find Experts, Get Answers, Share Insights

Current Deployment Version on Windows Form Title (C#)

 
Join Date: Feb 2010
Location: Italy
Posts: 3
#1   Feb 9 '10
I was checking online how to get the deployment version to put in the title of the main form, and the thread I found here on Bytes just missed few things.
That is the main why I registered and join this really useful community.

Here below is how to get the deployment version on the title of the main form (at least the solution I found :)):
In the load event of the form:
try
{
this.Text += " - [v: " + System.Deployment.Application.ApplicationDeploymen t.CurrentDeployment.CurrentVersion.ToString() + "]";
}
catch
{
this.Text += "what yuo want";
}
Just an explanation: this try catch is only to avoid the error while testing the application before publishing. Once published you will get the current deployment version on the title of the main form.

Hope my first tip will help.


Reply

Tags
current version, deployment version, version title