navigation
 Wednesday, November 26, 2008

There are times when you may want to create your own custom build configuration in Visual Studio, such as to define compiler symbols or to set build options for different projects within the same solution.  Fortunately, as I recently discovered, Visual studio makes this very simple. 

Select your solution in the solution explorer, then use the Build menu to choose "Configuration Manager", which will let you manage the different configurations of your project.

image

Next, from the left-most drop down menu, choose "New" to create your own configuration.

image

From the next window, you can name your configuration, and even select whether you want to base it off of Release or Debug, or no configuration at all.

image

Click OK, and your new build configuration will be available from the drop down menu, just like Build and Release.  You can define symbols for your configuration from the Build tab of the solution properties, as well.

image

And finally, my favorite part - you can check these changes in to your source control using Team Foundation Server, and the rest of your team members can use the new configuration as well.  As I said, Visual Studio makes it simple!