Solving development problems  |  About this blog

Archive for the ‘version’ tag

Auto-incement assembly build version in Visual Studio 2008

When building a project with Visual Studio an output assembly with embedded version is generated. Version indicates how an application is advancing in development.

Developer can change output assembly version for each project by opening project’s properties (right click, Properties), clicking Assembly Information… button and editing text in fields (see marked area on the image below).

VS2008 window for changing assembly version

VS2008 window for changing assembly version

Alternative is to open Properties/AssemblyInfo.cs or .vb and change AssemblyVersion value in a text editor.

Version can be automatically incremented on each build. To enable counter open Properties/AssemblyInfo.cs and set:

//Change AssemblyVersion's value from 1.0.0.0 to 1.0.* and comment AssemblyFileVersion
[assembly: AssemblyVersion("1.0.*")]
//[assembly: AssemblyFileVersion("1.0.0.0")]

Auto-increment symbol (‘*’) cannot be set in GUI (like screenshot above) but only in code.

Written by developer

January 18th, 2010 at 5:12 pm