Publish Version Info in a label

I

igendreau

Simple question... Using Visual Studio 2005 to create a small app.
Under my project properties, publish tab, I have it auto incrementing
the revision number every time I publish. Is there any way to put a
label on my main form that displays the current revision? I'd just
like a little label that literally says "1.0.0.7" so it's easy to see
what version of the software my end user is using. Any thoughts? Let
me know. Thanks!
 
S

ShaneO

igendreau said:
Simple question... Using Visual Studio 2005 to create a small app.
Under my project properties, publish tab, I have it auto incrementing
the revision number every time I publish. Is there any way to put a
label on my main form that displays the current revision? I'd just
like a little label that literally says "1.0.0.7" so it's easy to see
what version of the software my end user is using. Any thoughts? Let
me know. Thanks!

(Watch for wrapping!)

If System.Deployment.Application _
..ApplicationDeployment.IsNetworkDeployed Then
Label1.Text = System.Deployment.Application _
..ApplicationDeployment.CurrentDeployment.CurrentVersion.ToString
Else
Label1.Text = My.Application.Info.Version.ToString
End If



ShaneO

There are 10 kinds of people - Those who understand Binary and those who
don't.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top