473,387 Members | 2,436 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,387 software developers and data experts.

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 23139

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.CurrentVersion.ToString

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.CurrentVersion.ToString
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.Diagnostics.Debugger.IsAttached = False Then
lb_version.Text = "Version : " &
My.Application.Deployment.CurrentVersion.ToString
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
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
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) {...
3
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...
3
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...
2
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...
3
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...
6
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...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...

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.