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


#ifndef AUTOBUILDCOUNT_H
#define
AUTOBUILDCOUNT_H
#define BUILDCOUNT_NUM 6
#define BUILDCOUNT_STR "6"
#endif

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



// 7
#ifndef AUTOBUILDCOUNT_H
#define AUTOBUILDCOUNT_H
#define BUILDCOUNT_NUM 7
#define BUILDCOUNT_STR "7"
#endif

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"

//…

CAboutDlg::CAboutDlg()
{
m_strBuild.Format(_T("Build %d"), BFCBUILDCOUNT_NUM);
}

Installation:



  1. Copy the file BuildCount.dll to a local folder
    (DevStudioSharedIDEAddIns 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

More by Author

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Must Read