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

Getting the publish version number using VB.NET 2008

Dean,

You can retrieve the "publish version" number from the Project Settings using this:

If (System.Deployment.Application.ApplicationDeployme nt.IsNetworkDeployed) Then
Dim verDeployed As System.Version = My.Application.Deployment.CurrentVersion
End If
Jun 27 '08 #1
1 10593
To display published(network deployed) or assembly version:

' test if network deployed
Dim verDeployed As System.Version
Dim strVerDeployed As String
If (System.Deployment.Application.ApplicationDeployme nt.IsNetworkDeployed) Then
verdeployed = My.Application.Deployment.CurrentVersion
strVerDeployed = verDeployed.ToString
Else ' or if command line execution
Dim asmThis As System.Reflection.Assembly = System.Reflection.Assembly.Load("CADView")
Dim asnThis As System.Reflection.AssemblyName = asmThis.GetName()
verDeployed = asnThis.Version
strVerDeployed = verDeployed.ToString
End If
Me.Text = My.Settings.CompanyName & " " & My.Settings.WindowTitle & " v." & strVerDeployed
Jun 27 '08 #2

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

Similar topics

1
by: Naimul Huq | last post by:
Hi! In my assemblyInfo.vb, I have change the version number to 1.2 <Assembly: AssemblyVersion("1.2.*")> But when I try to retrive the version with version class, I still get my old version...
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) {...
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...
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...
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...
14
by: Phil | last post by:
I have been using this code to display the version number, and this has worked well, but I am now changing from using the ClickOnce publishing to a proper setup project, and this no longer works. ...
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: 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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
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,...
0
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...

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.