473,322 Members | 1,405 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

getting the application publish version

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

Jan 3 '08 #1
6 13141
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"?
Jan 3 '08 #2
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"?
Jan 3 '08 #3
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"?
Jan 4 '08 #4
On Jan 3, 8:00 pm, "Aussie Rules" <aus...@nospam.comwrote:
yep,

i want to get that value in the runtime application, not the vs ide

"kimiraikkonen" <kimiraikkone...@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"?
What about this?

' ' ' ' ' ' '
My.Application.Info.Version.ToString
' ' ' ' ' ' '
Jan 4 '08 #5
>
' ' ' ' ' ' '
My.Application.Info.Version.ToString
' ' ' ' ' ' '
Update: This method only gives assembly version.

Also, i don't know how to see publish version (VB.NET 2005, without
SP), but publish version is not synronized with assembly version as
well. Right/why?
Jan 4 '08 #6
See my other post. I'm assuming the OP is using ClickOnce, and you have to
pull the DeploymentVersion. And you can only see it if you are running the
deployed version, not if you are running in VS. It's kind of a pain, but not
a huge problem for us.

If you want them to be the same, you have to update the assembly version
before doing the deployment.

RobinS.
GoldMail, Inc.
---------------------------------

"kimiraikkonen" <ki*************@gmail.comwrote in message
news:46**********************************@h11g2000 prf.googlegroups.com...
>
>>
' ' ' ' ' ' '
My.Application.Info.Version.ToString
' ' ' ' ' ' '

Update: This method only gives assembly version.

Also, i don't know how to see publish version (VB.NET 2005, without
SP), but publish version is not synronized with assembly version as
well. Right/why?
Jan 5 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Wilfried Mestdagh | last post by:
Hi, How to get in code the "publish version" of an application. Seems Assembly version is not the same as publish version. -- rgds, Wilfried http://www.mestdagh.biz
2
by: Steven Spits | last post by:
Hi, Is it possible to show the publish version in a app that is deployed using ClickOnce? Assembly.GetExecutingAssembly().GetName().Version shows the assembly version... Steven
7
by: Mike L | last post by:
I want frmMain.text to show the current publish version. What is the code to get the current publish version? For example. frmMain.text = "My Application Version: " & project.publish.version ...
4
by: Mike L | last post by:
Error occurs on "System.Deployment.Application.ApplicationDeployment.CurrentDeployment" ** Here is my code private void frmMain_Load(object sender, System.EventArgs e) {...
6
by: Support | last post by:
My vb.net 2.0 application has a publish version of major = 1, Minor =0, Build = 2 and Revision = 11 with Automatically increment selected. How do I programatically extract that information....
5
by: barrysmith1966 | last post by:
Hello, I am using VS2005 and the publish feature. Is there any way I get the version number from within my application? i.e. I have a splash screen and would like to display the latest...
2
by: virallinen | last post by:
Hi all Problem is, that My.Application.Info.Version shows only version 1.0.0.0 even if my application is version 1.0.0.0. Even when published My.Application.Deployment.CurrentVersion.ToString...
1
by: igendreau | last post by:
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...
1
by: Peter Hentrich | last post by:
Dean, You can retrieve the "publish version" number from the Project Settings using this: If (System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed) Then Dim verDeployed As...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.