Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ProductVersion not incrementing

Status
Not open for further replies.

AvatarZA

Programmer
Sep 26, 2002
42
ZA
I am trying to put the vesion of my app on the interface, I have used all 3 of the following to get the vesion

Windows.Forms.Application.ProductVersion.ToString

or

System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly.Location).ProductVersion

or

System.Reflection.Assembly.GetExecutingAssembly.GetName().Version.Major.ToString() & "." & System.Reflection.Assembly.GetExecutingAssembly.GetName().Version.Minor.ToString() & "." & System.Reflection.Assembly.GetExecutingAssembly.GetName().Version.Build.ToString()

They all work but when i build my app the ProductVersion is not changing i have also checked the exe and the version is also staying the same there to. How does vb.net increment the version, do you need to set it up somewhere. Could you please advise me on this, cause i need to display the version.

Thanks a lot.
 
I'm new to VB.Net and am still on the bottom of the learning curve. Hopefully this will help.

The assembly attributes are located in the AssemblyInfo.vb file. You can manually set the Major and Minor version numbers.

' 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(&quot;1.3.*&quot;)>
 
What he said but also make sure that you have checked off enable incremental build.

Go to the properties of your project. Select configuration Properties ->Optimizations
Then check the option.

Hope this works for you. That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
Thanks guys I will try and see what i can do.
 
AvatarZA - Did you ever figure it out? I'm having the same issue with version incrementing not happening.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top