How to have an auto incrementing version number in Visual Studio

  • Thread starter Thread starter bootzilla
  • Start date Start date
B

bootzilla

Guest
I currently hard code a version number in a site master page using a label but I want to be able to displayed the version number by auto increment it instead of a hard code text. How do I do that?


Here is the current code for the label

<asp:Label runat="server" ID="lblBuildNumber" ForeColor="White" Text="Build: 1.3.027" />


I have the version number in a AssemblyInfo.cs file.


using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Miller.BL")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("Miller.BL")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2009")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("ea9aeb9b-08d8-42e1-b17d-e0e9cd498872")]

// 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.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

Continue reading...
 
Back
Top