BuildCount Add-In

Here is an add-in module for Developer Studio which automatically creates and modifies the file "AutoBuildCount.h" that contains a macros with a build count values. The file can be inserted into your current project. 

For example, if your project is on build 6, the contents of the file look like this:

// 6
#define BUILDCOUNT_STR "6"

At the next build, the content will be updated to:

// 7
#define BUILDCOUNT_STR "7"

You can use the macros BUILDCOUNT_NUM and/or BUILDCOUNT_STR in the code to refer to the automatically generated build number. For example, to use the build number in your about box, you could use the macro as follows:

#include "AutoBuildCount.h"


    m_strBuild.Format(_T("Build %d"), BFCBUILDCOUNT_NUM);


  1. Copy the file BuildCount.dll to a local folder (DevStudio\SharedIDE\AddIns if the preferred folder).
  2. At the Developer Studio, choose Customize from the Tools menu.
  3. Select Browse from the Add-ins and Macro Files page.
  4. Select 'Add-ins (.dll)' from the 'Files of type' combo-box.
  5. Select the BuildCount.dll from its folder and click on Open.

Recent Updates/Fixes

1. MSDEV has a failure when exiting.
2. GPF when the file AutoBuildCount.h is read-only.

Download File - 11.7KB


  • how to stop file modified out of source editor ?

    Posted by Legacy on 10/18/2000 12:00am

    Originally posted by: lee

    how do i stop it showing this message every time i recompile, because the autobuildcount.h has been updated ?


  • source please

    Posted by Legacy on 05/25/2000 12:00am

    Originally posted by: Mike McCanney

    Where can I get the source for this?

  • Inaccurate build number using more than one project in one workspace

    Posted by Legacy on 04/18/2000 12:00am

    Originally posted by: J�rg Schlingmann

    Hi there,

    I' m using a workspace containing more than 120 projects.
    If I compile only one project everything works fine. (I accept the buildcount increasing 2)
    Rebuilding the whole workspace causes increasing the buildcount number of the currently active project
    > 120 times not increasing any other buildcount number.
    Does anyone know a workaround? (VC++ 5.0 Servicepack 3, NT4 Servicepack 5)


  • Increment only for release builds

    Posted by Legacy on 01/19/2000 12:00am

    Originally posted by: Gene Koesling

    To increment only during release builds it should work 
    if you just wrap the include in a preprocessor if test:

    #ifndef _DEBUG
    #include "AutoBuildCount.h"

  • Nice, but big feature needed...

    Posted by Legacy on 09/10/1999 12:00am

    Originally posted by: Thelonious Georgia

    Hi, as DevStudio knows when a build did not complete due to an error, it would be nice if somehow the build number could 'unwind', as it wasn't really a build in the first place.

  • Source Again

    Posted by Legacy on 08/02/1999 12:00am

    Originally posted by: Paul Hartness

    Having the source for this would be good. I'd like to have a version of this that would only increment for release builds also some method of synchronising these numbers in a multi-user environment. Maybe by having a global network location for AutoBuildCount.h which had counts for different projects.

  • Unicode/MBCS Support + Release/Debug

    Posted by Legacy on 07/29/1999 12:00am

    Originally posted by: Victor Boctor

    I think this is a very nice add-on. The only comments I have are:

    1. The header file should have two counters one for the release and one for the debug. The one that is to be incremented should depend on the current configuration. However, the current constants should map to one of them according to the definition of the _DEBUG preprocessor. By this we will have a separate counter for the debug and another for the release.

    2. For the string, I think the macro _T should be used so that the compilation would work ok with normal, unicode, and MBCS.


  • Great Job! .. Feature Request

    Posted by Legacy on 06/16/1999 12:00am

    Originally posted by: David Berman

    Thank you very much for making this add-in. You did
    a great job.

    It seems that the file AutoBuildCount.h must be in
    the same directory as the project file. It would
    be nice if we could put that file wherever we wanted
    to and add it to the project. If the plugin scans
    the project and found the specified location of
    this header, it should use that file instead of
    creating a new one.

    Thanks again.


Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • As the mobile enterprise marketplace expands and customer needs grow more diverse, Samsung recognizes that solution partners and developers play an essential role by continually innovating to meet their customers' needs. Samsung works to provide these developers and partners with the latest tools and resources needed to create these solutions. Read this program guide to learn how the Samsung Enterprise Alliance Program provides partners and developers with Samsung enterprise software development kits (SDKs) …

  • U.S. companies are desperately trying to recruit and hire skilled software engineers and developers, but there's simply not enough quality talent to go around. In response, companies often resort to inferior solutions -- hiring substandard developers and engineers, recruiting talent on a part-time or temporary basis, poaching people from competitors, or burdening an already stressed IT staff for more of their labor. Fortunately, there's a better solution. Read this white paper to learn the business value of …

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date