Welcome to MSDN Blogs Sign in | Join | Help

Auto increment the build number in the 'AssemblyVersion'

Q) How to auto-increment the build number of the ‘AssemblyVersion’ in a managed application?

A) Locate the AssemblyInfo.cs (or VB) file and make the following change - [assembly: AssemblyVersion("1.0.*")] – Voila!!! The assemblyversion should now automatically change after each build. However, be warned – changing the buildnumber in a class library would result in the recompilation of all dependent assemblies.

Published Tuesday, December 20, 2005 2:58 PM by seshadripv
Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: Auto increment the build number in the 'AssemblyVersion'

This doesn't work under Visual Studio 2005. Could you go smack whoever took this out of VS 2005 for me? Thanks. :)

Wednesday, October 11, 2006 1:39 PM by Scott

# re: Auto increment the build number in the 'AssemblyVersion'

It works... but...

increment is not sequential.

for example, I have run several times and I get:

1.0.2782.397

1.0.2782.416

1.0.2782.423

next day:

1.0.2783.560

I would like to start in: 1.0.0.x, then 1.0.1.x and so on.

I do not want to start in a higer number.

Thanks,

Bye

Monday, August 13, 2007 7:20 PM by carlos

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker