Archived

This topic is now archived and is closed to further replies.

Prozak

Generating Build Numbers

Recommended Posts

Hi, i guess most of you have seen that line that says: "Software version 1.0, Build 3211"... Now i guess that each time i hit compile, a new build is created, which in turn increments the build number. Does Visual Studio have this option? How can i set an incremental build number? Thanks,

[Hugo Ferreira][Positronic Dreams]
All your code are belong to us!

Share this post


Link to post
Share on other sites
Depends on what you are using as your language. I don''t remember about plain C++, but for managed C++ and C#, VS.NET creates a file AssemblyInfo.cpp (.cs) and there you can specify which version you want to increment automatically, and which manually. The versions being, VV.MM.RR, where VV is the release number, MM is major revision, and RR is minor revision (or, build number).

I am also pretty sure that if you look around the Project properties for unmanaged C++, there is something about versioning, though I don''t remember where it is off the top of my head, and I don''t have access to VS right now...

Share this post


Link to post
Share on other sites
You can do it with a pre-build action which increments a number in a source file. But there''s really not much reason for you to bother with this.


How appropriate. You fight like a cow.

Share this post


Link to post
Share on other sites
Build numbers are useful for lots of developers and testers with bug databases and test frameworks, etc, where you do regular builds (say, every day) and need high turnaround on bugs. For anything less formal, regular version numbers should do.

I like pie.

Share this post


Link to post
Share on other sites