Hi, when I build and publish a VB.net 2005 program, the version number is incremented automatically - is this held in a variable anywhere that I can use to display within my application
have you change the version number stored in the assembly file
Ah! No I hadn't - so I see how to do that now.
However, I am more interested in getting to the publish version - then I can match up exactly which version of my distributed file my users have, without having to update the assembly version and match it to publish version. Isn't there any way to get a "publishversion" variable
Version control
Christian Sparre
Deployment.Application.ApplicationDeployment.CurrentDeployment.CurrentVersion.ToString()
vito1281
Ah! No I hadn't - so I see how to do that now.
However, I am more interested in getting to the publish version - then I can match up exactly which version of my distributed file my users have, without having to update the assembly version and match it to publish version. Isn't there any way to get a "publishversion" variable
Tamim Sadikali
Try this:
Dim
theFileVersion As FileVersionInfotheFileVersion = FileVersionInfo.GetVersionInfo(filepathandname)
KissPsycho
Application
.ProductVersionHope this helps.
fripper
Zooz
Thanks but afraid not. It's the publish version I need. This is currently at 8.0.0.3, application.productversion returns 1.0.0.0
manasi
Check out the following
My.Application.Deployment Namespace
http://msdn2.microsoft.com/en-gb/library/dzt1y5bx.aspx
More specifically the currentversion property which will give you the clickonce publish version number