Version Numbers

  • Thread starter Thread starter Mike Borrowdale
  • Start date Start date
M

Mike Borrowdale

Hi,

forgive the newbie question...

I'm using VS2008 Express with c#, clickonce publishing. I can see that
my published versions have version numbers 1.0.0.1, 1.0.0.2 etc. How
can I access this version number at run time to go on a 'help about'
page? AssemblyVersion doesn't seem to have quite the same semantics,
it's either fixed (so I need to remember to update it for each new
release) or if I use the 1.0.* variant then I get 1.0.<random number>
rather than a nicely incrementing version.

Thanks in advance

Mike

--
 
if
(System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed)
{

System.Deployment.Application.ApplicationDeployment ad =
System.Deployment.Application.ApplicationDeployment.CurrentDeployment;
version = ad.CurrentVersion.ToString();
}

Marc
 
Marc said:
if
(System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed
) {

System.Deployment.Application.ApplicationDeployment ad =
System.Deployment.Application.ApplicationDeployment.CurrentDeployment;
version = ad.CurrentVersion.ToString();
}

Thanks Marc,

unfortunately the application is installed from CD rather then network.
Is there an alternate version for that scenario?

Mike

--
 
(just to tie this thread up; posted separately by OP)

Hi Marc,

ignore my last post, I finally realised that it will correctly
retrieve
the version of an installed application but nothing while debugging.
So
my help form fetches the build number while debugging and this
version
when installed. Just what the doctor ordered! Thanks.


Mike
 
Back
Top