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

Home Posts Topics Members FAQ

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.Deploym ent.Application .ApplicationDep loyment.IsNetwo rkDeployed) Then
Dim verDeployed As System.Version = My.Application. Deployment.Curr entVersion
End If
Jun 27 '08 #1
1 10611
To display published(netwo rk deployed) or assembly version:

' test if network deployed
Dim verDeployed As System.Version
Dim strVerDeployed As String
If (System.Deploym ent.Application .ApplicationDep loyment.IsNetwo rkDeployed) Then
verdeployed = My.Application. Deployment.Curr entVersion
strVerDeployed = verDeployed.ToS tring
Else ' or if command line execution
Dim asmThis As System.Reflecti on.Assembly = System.Reflecti on.Assembly.Loa d("CADView")
Dim asnThis As System.Reflecti on.AssemblyName = asmThis.GetName ()
verDeployed = asnThis.Version
strVerDeployed = verDeployed.ToS tring
End If
Me.Text = My.Settings.Com panyName & " " & My.Settings.Win dowTitle & " v." & strVerDeployed
Jun 27 '08 #2

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

Similar topics

1
1755
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 number System.Environment.Version.Minor.toStrinr() gives me 1 instead of 2
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;
5
23171
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
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;
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.
14
2270
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. If System.Diagnostics.Debugger.IsAttached = False Then Version.Text = "Version : " & My.Application.Deployment.CurrentVersion.ToString() Else Version.Text = "Debug Mode" End If
0
9524
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
10449
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
10217
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...
0
9047
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
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
5568
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
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.