Publish Version Info in a label

  • Thread starter Thread starter igendreau
  • Start date Start date
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!
 
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.
 
Back
Top