469,644 Members | 1,978 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Getting the publish version number using VB.NET 2008


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

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Naimul Huq | last post: by
7 posts views Thread by Mike L | last post: by
4 posts views Thread by Mike L | last post: by
5 posts views Thread by barrysmith1966 | 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
14 posts views Thread by Phil | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.