#114 – Creating a New Build Configuration

Visual Studio projects are created with two build configurations–Debug and Release.

You can also create your own build configurations.  You might do this if you wanted to easily be able to build with a particular symbol defined, which in turn triggers conditional compilation.

To create a configuration, click on the Configuration Manager… option in the configurations dropdown.  A manager window appears.

Click on the configuration dropdown at the left and select New.

Give the new configuration a name and select a configuration to copy from.  Click OK.

Close the configuration manager and open the project properties dialog.  You’ll see your new configuration listed in the configuration dropdown.

You can now define a symbol that exists only in this new configuration.

And then define code that gets compiled if the new symbol is defined.

#if LOGGING
    DoSomeLogging();   // To assist in debugging
#endif
Advertisements

About Sean
Software developer in the Twin Cities area, passionate about software development and sailing.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: