By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,661 Members | 781 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,661 IT Pros & Developers. It's quick & easy.

Version no

P: n/a
Hi

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

Thanks

Regards
Nov 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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).Product Version

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

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

MsgBox (S)

Regards,
Fergus
Nov 20 '05 #2

P: n/a
* "John" <jo**@nospam.infovis.co.uk> scripsit:
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'.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #3

P: n/a
Thanks. The version number remains the same however. How or when is the
version number supposed to change?

Thanks

Regards
"Fergus Cooney" <fi*****@post.com> wrote in message
news:OW**************@TK2MSFTNGP10.phx.gbl...
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).Product Version

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

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

MsgBox (S)

Regards,
Fergus

Nov 20 '05 #4

P: n/a
* "John" <jo**@nospam.infovis.co.uk> scripsit:
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.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.