469,641 Members | 1,129 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,641 developers. It's quick & easy.

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 22770

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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Wilfried Mestdagh | last post: by
7 posts views Thread by Mike L | last post: by
4 posts views Thread by Mike L | last post: by
3 posts views Thread by =?Utf-8?B?aG93YXJkd0Bub3NwYW0ubm9zcGFt?= | last post: by
3 posts views Thread by Bill Cart | last post: by
6 posts views Thread by Aussie Rules | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.