Version no

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

Is there a way to get the version number of my vb.net app, that is provided
by vs?

Thanks

Regards
 
* "John said:
Is there a way to get the version number of my vb.net app, that is provided
by vs?

'System.Reflection.Assembly.GetExecutingAssembly().GetName().Version' or
'Application.ProductVersion'.
 
Hi John,

There's a fair old choice with this one. Have a play with these:

Dim S As String

S = S & vbCrLf & Application.ProductVersion

S = S & vbCrLf & System.Diagnostics.FileVersionInfo. _
GetVersionInfo(Application.ExecutablePath).ProductVersion

S = S & vbCrLf & System.Reflection.Assembly. _
GetExecutingAssembly().GetName().Version.ToString

S = S & vbCrLf & System.Reflection. _
Assembly.GetExecutingAssembly().GetName().Version.ToString

MsgBox (S)

Regards,
Fergus
 
Thanks. The version number remains the same however. How or when is the
version number supposed to change?

Thanks

Regards
 
* "John said:
Thanks. The version number remains the same however. How or when is the
version number supposed to change?

Basic information on versioning:

<http://msdn.microsoft.com/library/en-us/dndotnet/html/managevers.asp>
<http://msdn.microsoft.com/library/en-us/dnbda/html/tdlg_ch5.asp>
<http://msdn.microsoft.com/library/en-us/cptutorials/html/versioning_components.asp>

Parts of the version number:

Main version
"Product" version.
Sub version
Sub version, for example Service Pack.
Build
During development, auto-increment.
Revision
Hotfix or Quick Fix Engineering (QFE).

When using auto incrementation of numbers, the build number contains the
number of days since January, 2000; the revision contains the number of
seconds since midnight divided by 2.

The version number can be changed in the file "AssemblyInfo.vb". The
version number will change automatically when re-opening the solution.
 
Back
Top