How can I set the version numbers for my application?

  • Thread starter Thread starter Christian Blackburn
  • Start date Start date
C

Christian Blackburn

Hi Gang,
I would like to be able to control the versioning of my application can
somebody tell me where I can set that?
Thanks in Advance,
Christian Blackburn
 
Christian Blackburn said:
I would like to be able to control the versioning of my application
can somebody tell me where I can set that?

Have a look in the file assemblyinfo.vb and the docs for the
AssemblyVersionAttribute class.
 
Hi Armin,
Thank you very much for the info. I went with: <Assembly:
AssemblyVersion("1.0.6.*")> for v1.06. Do you know how to access
individual parts of the version number from code at runtime. I realize I
can parse the periods in the string, but there should be a way to access
app.major, minor, revision, etc..
Thanks,
Christian Blackburn
 
Christian Blackburn said:
Thank you very much for the info. I went with: <Assembly:
AssemblyVersion("1.0.6.*")> for v1.06. Do you know how to access
individual parts of the version number from code at runtime. I
realize I can parse the periods in the string, but there should be a
way to access app.major, minor, revision, etc..

Seems like you are coming from VB6 (when mentioning about app.major, ...):

ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB/vbcon/html/vxconchangestoappobject
invisualbasicnet.htm

(see hints in signature)


Imports System.Diagnostics
'...
Dim FVI As FileVersionInfo
FVI = FileVersionInfo.GetVersionInfo( _
System.Reflection.Assembly.GetExecutingAssembly.Location _
)

MsgBox(FVI.FileMajorPart)
MsgBox(FVI.FileMinorPart)
MsgBox(FVI.FileBuildPart)
MsgBox(FVI.FilePrivatePart)

MsgBox(FVI.FileVersion)


--
Armin

- Links might be split into two lines. Concatenate them using notepad.
- Links might require to add a ".nnnn" after the "2003FEB", e.g.
"2003FEB.1033" for localized versions.
- Links starting with "ms-help" are URLs for the document explorer (<F1>).
Paste them in the URL textbox and press enter. Using internal help (menu
tools -> options -> environment -> help), display the "Web" toolbar that
contains the textbox.
 
Hello,

Christian Blackburn said:
I would like to be able to control the versioning of my application can
somebody tell me where I can set that?

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".
 
Hello,

Christian Blackburn said:
Thank you very much for the info. I went with: <Assembly:
AssemblyVersion("1.0.6.*")> for v1.06. Do you know how to access
individual parts of the version number from code at runtime. I realize I
can parse the periods in the string, but there should be a way to access
app.major, minor, revision, etc..

'System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Major'
etc.
 
Hello Herfriend and Armin,
Thank you both very much for the info. I used your tips to make it display
"1.16" or .Major & .Minor & .Build :).
Cheers,
Christian
 
Back
Top