Are you using ClickOnce deployment? Is that what you mean when you say
you are using "the publish feature" ?
If so, you can only see the deployment version when you are running the
deployed version. Here's how to get it. Sorry; this is in C#. I really
miss VB...
string ourVersion = string.Empty;
//if running the deployed application, you can get the version
// from the ApplicationDeployment information. If you try
// to access this when you are running in Visual Studio, it will not work.
if (System.Deployment.Application.ApplicationDeployme nt.IsNetworkDeployed)
{
ourVersion =
ApplicationDeployment.CurrentDeployment.CurrentVer sion.ToString();
}
else
{
if (_assemblyInfo != null)
{
ourVersion = _assemblyInfo.GetName().Version.ToString();
}
}
This is probably the same thing in VB (no promises, it's been a while):
'if running the deployed application, you can get the version
' from the ApplicationDeployment information. If you try
' to access this when you are running in Visual Studio, it will not work.
Dim ourVersion as String
If System.Deployment.Application.ApplicationDeploymen t.IsNetworkDeployed
ourVersion =
ApplicationDeployment.CurrentDeployment.CurrentVer sion.ToString();
Else
If _assemblyInfo IsNot Nothing
ourVersion = _assemblyInfo.GetName().Version.ToString();
End If
End If
Good luck; hope this helps.
RobinS.
GoldMail, Inc.
--------------------------------------
"Aussie Rules" <au****@nospam.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
yep,
i want to get that value in the runtime application, not the vs ide
"kimiraikkonen" <ki*************@gmail.comwrote in message
news:01**********************************@e25g2000 prg.googlegroups.com...
>On Jan 3, 4:45 pm, "Aussie Rules" <aus...@nospam.comwrote:
>>Hi,
I use the publish feature within Vs.net 2008, and have it set to
increment
on each build/publish
I want to be able to display this as my application version number, but
can
not see how to access the information.
application.productversion doesn't seem to access/use the publish
version.
Thanks
Isn't there "publish" in solution explorer -your app -right click
then properties -"publish"?