Jump to content

Auto increment build number


Recommended Posts

Evening all!

Is there a way to add a build number to a project in VS which auto increments every time you hit the build button and gives an accessible variable that can be printed to the KSP log? I'm sure I've seen to something like that mentioned, but I can't find any reference to it now.

Thanks, as always

Link to comment
Share on other sites

See this link: http://stackoverflow.com/questions/826777/how-to-have-an-auto-incrementing-version-number-visual-studio for a few methods to change the AssemblyVersion attribute. Once you have an incrementing system in place, you can get the version number programatically with something like:

string version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...