473,857 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.pro ductversion doesn't seem to access/use the publish version.

Thanks

Jan 3 '08 #1
6 13191
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.pro ductversion 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
"kimiraikko nen" <ki************ *@gmail.comwrot e in message
news:01******** *************** ***********@e25 g2000prg.google groups.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.pr oductversion 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 ApplicationDepl oyment information. If you try
// to access this when you are running in Visual Studio, it will not work.
if (System.Deploym ent.Application .ApplicationDep loyment.IsNetwo rkDeployed)
{
ourVersion =
ApplicationDepl oyment.CurrentD eployment.Curre ntVersion.ToStr ing();
}
else
{
if (_assemblyInfo != null)
{
ourVersion = _assemblyInfo.G etName().Versio n.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 ApplicationDepl oyment information. If you try
' to access this when you are running in Visual Studio, it will not work.
Dim ourVersion as String
If System.Deployme nt.Application. ApplicationDepl oyment.IsNetwor kDeployed
ourVersion =
ApplicationDepl oyment.CurrentD eployment.Curre ntVersion.ToStr ing();
Else
If _assemblyInfo IsNot Nothing
ourVersion = _assemblyInfo.G etName().Versio n.ToString();
End If
End If

Good luck; hope this helps.
RobinS.
GoldMail, Inc.
--------------------------------------

"Aussie Rules" <au****@nospam. comwrote in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
yep,

i want to get that value in the runtime application, not the vs ide
"kimiraikko nen" <ki************ *@gmail.comwrot e in message
news:01******** *************** ***********@e25 g2000prg.google groups.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.p roductversion 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

"kimiraikko nen" <kimiraikkone.. .@gmail.comwrot e in message

news:01******** *************** ***********@e25 g2000prg.google groups.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.pro ductversion 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.To String
' ' ' ' ' ' '
Jan 4 '08 #5
>
' ' ' ' ' ' '
My.Application. Info.Version.To String
' ' ' ' ' ' '
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 DeploymentVersi on. 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.
---------------------------------

"kimiraikko nen" <ki************ *@gmail.comwrot e in message
news:46******** *************** ***********@h11 g2000prf.google groups.com...
>
>>
' ' ' ' ' ' '
My.Application .Info.Version.T oString
' ' ' ' ' ' '

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
1328
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
5456
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
45950
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 But I don't know how to call the project.publish.version numbers.
4
6376
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) { System.Deployment.Application.ApplicationDeployment ad = System.Deployment.Application.ApplicationDeployment.CurrentDeployment;
6
4487
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. Thanks Terry
5
23182
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 version number. Ta in advance Barry
2
11141
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 is still 1.0.0.0 (real 1.0.0.2 or more)
1
8919
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 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!
1
10616
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 System.Version = My.Application.Deployment.CurrentVersion End If
0
9768
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10808
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9549
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7940
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7104
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5774
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5971
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4191
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.