This website may use cookies. More info. That's Fine x
Welcome Login

Visual Studio: Getting project version number


Visual Studio 2010

To display assembly version number on your web page, you can use reflection to get the major, minor, build, and revision numbers:

GetType().Assembly.GetName().Version.ToString();

 

 

Version number information comprises of:

major.minor.build.revision

 

You can increment version at:

Method 1:

Right click on project node > Properties > Assembly Information... button

Or:

Double click on Properties node of your project > Assembly Information... button

vs-version2

 

 

Method 2:

Properties/AssemblyInfo.cs file of your project.

vs-version1

 

Note: both of the above does the same thing.


Created on: Wednesday, March 16, 2011 by Andrew Sin