Auto Increment VS 2005 Build Numbers

I wanted to enable auto incrementing build numbers on an app last night at home in VS 2005, but this feature is doesn’t exist in VS, unfortunately.

A quick google search later I found this solution on the Code Project that will modify your AssemblyInfo file with updated build numbers each time you build in VS.  I was skeptical about using this after looking at the code because it seems to be a hack, also, I didn’t want to add another assembly reference to my projects, and I’ve had issues in the past with using code from Code Project (typos, won’t compile, etc).

But, I decided to give it a whirl. I downloaded the project and built the assembly (it worked!), then followed the directions detailed for using the resulting assembly.

It worked perfectly.

Now my build numbers are auto incremented, and even better, if I don’t like the numbering scheme, it’s easy enough to change it myself cause I have the source code.  Also, there is no need to reference the assembly in your project, you just need to point the project file to the location of the assembly.

Comments are closed.