Wednesday, December 12, 2012

Automatically Increment Version number for Assembly

I have to look this up every time I do it, so I am posting this link to make it easier to find.

To summarize, you have to change the C# assemblyinfo.cs file from:

[assembly: AssemblyVersion("")]
[assembly: AssemblyFileVersion("")]

to just:

[assembly: AssemblyVersion("1.0.*")]
The AssemblyFileVersion entry must not be present. 
The version only increments when the project is opened, so it may appear that the version does not increment.
For VB.NET it is similar.   Edit the assemblyInfo.vb file and change:

The GUI for Assembly Version does not let you make this change.