Application version management

phbernard

New member
Joined
Dec 2, 2003
Messages
2
Hi,

I cant find out how to manage my VB .NET application version. I would like to set its major/minor version numbers and diplay in a "About dialog" something like "This is product version <major>.<minor>.<build>". I almost expect VB to give me the build number.

I had a look to Application.ProductVersion, but I dont know where <major> and <minor> come from.

Im really sorry to ask such question on a forum, because this seems to be a really usual task, but I cant find anything interesting about it. All I need is probably a link to the web page page called "VB .NET Application Version quick and easy"


Best regards,

Philippe
 
These are set in your assembly file... look in it... somewhere youll see all that stuff... major/minor/description/etc.
 
Thank you for your answer.

In fact, I already had a look at this. I can get major/minor/build by using System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly.Location).FileMajorPart/FileMinorPart/FileBuildPart.

MajorPart and MinorPart are set to 1 and 0 respectively. Ok, I guess that MSVS set them for me when I created the project. But how can I change them ?

Moreover, BuildPart doesnt seem to be incremented when I re-build my project (its value is 1491).


So now that I have a version, how can I use it ? :)


Philippe
 
You can change them by editing the AssemblyInfo.vb file. It SHOULD be there in the solution explorer.

Code:
 Version information for an assembly consists of the following four values:

      Major Version
      Minor Version 
      Build Number
      Revision

 You can specify all the values or you can default the Build and Revision Numbers 
 by using the * as shown below:

<Assembly: AssemblyVersion("1.0.*")>
 
Back
Top