473,796 Members | 2,585 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Publish Version number

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

Aug 2 '06 #1
5 23171

ba************@ hotmail.com napisal(a):
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
Hi
If you would like to get your application version use this code:

My.Application. Info.Version

Hope this helps.

Regards,
sweet_dreams

Aug 2 '06 #2
by the way here is good article about My namespace:
http://www.15seconds.com/issue/050223.htm

it's really worth reading

sweet_dreams

Aug 2 '06 #3

sweet_dreams wrote:
Hi
If you would like to get your application version use this code:

My.Application. Info.Version

Hope this helps.

Regards,
sweet_dreams
Thanks but I did try this before but it returns a version number of
1.0.2133.26735 (version of the .exe file installed) whereas I published
the application using version 3.0.1.x

What I am trying to get is the 3.0.1.x version number returned.

Thanks in advance
Barry

Aug 2 '06 #4
AMP

ba************@ hotmail.com wrote:
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

Try
pvversion = "Publish Version: " &
My.Application. Deployment.Curr entVersion.ToSt ring

Aug 2 '06 #5

AMP wrote:
ba************@ hotmail.com wrote:
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


Try
pvversion = "Publish Version: " &
My.Application. Deployment.Curr entVersion.ToSt ring
Thats the job! Thanks very much.

For anyone else reading this you will also need to take into account
the following.

Will fall over during running debug mode so use the following to get
round this.

If System.Diagnost ics.Debugger.Is Attached = False Then
lb_version.Text = "Version : " &
My.Application. Deployment.Curr entVersion.ToSt ring
Else
lb_version.Text = "Debug Mode"
End If
Cheers
Barry

Aug 2 '06 #6

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

Similar topics

0
1325
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
7
45943
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
6371
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;
3
4037
by: =?Utf-8?B?aG93YXJkd0Bub3NwYW0ubm9zcGFt?= | last post by:
When I publish an application with ClickOnce, I specify Major, Minor, Build, and Revision numbers for the Publish Version, for example as 1, 0, 0, 97. But when I view the version of the exe file in explorer, or get it programatically, it comes back as 1.0. 0.0. The code I use is FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(Application.ExecutablePath); string version = fvi.FileVersion;
3
1911
by: Zim Babwe | last post by:
I have been making changes to my Windows Application and in the Project/Properties the Publish Version shows the following: Major: 1 Minor: 0 Build: 0 Revision: 45 I would like to show this information in the "About Screen" and I have: My.Application.Info.Version
2
6913
by: Zim Babwe | last post by:
I posted in another group but thought this was the better place to post, since it had to do with the vb language I have been making changes to my Windows Application and in the Project/Properties the Publish Version shows the following: Major: 1 Minor: 0 Build: 0 Revision: 45
3
12903
by: Bill Cart | last post by:
We are using c# windows forms and just trying to get started with .net. I want to do something that should be easy but I can't find any way to make it work. We are using Click Once to publish to a network drive and I need to be able to check if a program is the current version. Because the users can choose to not download the latest version this may be a problem. I just want to show what version they are running. I found some code that...
6
13186
by: Aussie Rules | last post by:
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.
1
10612
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
9673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9525
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,...
0
10452
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10221
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10003
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7546
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
6785
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
5569
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.