Skip to content

Tip 7.7: How to use Simplified Build Configurations

May 30, 2012

“Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio“, courtesy of ‘Sara Ford’

Sara Ford’s Blog

Sara Aside

The title for this tip as it appears on her blog is “How to pretend the Configuration Manager doesn’t exist, besides closing your eyes and saying, ‘I don’t see you.'” In other words, the Configuration Manager presented an interesting challenge for her as a tester. But Simplified Build Configurations really took it to a new level.

If you have never touched the Debug or Release configurations or have never heard of the Configuration Manager, you might want to try this tip.

Under Tools–Options–Projects And Solutions, you’ll see the Show Advanced Build Configurations option. Unchecking this option does quite a few things behind the scenes, but first, she’ll briefly describe the Show Advanced Build Configurations option.

By default, Visual Studio comes with two build configurations: Debug and Release. You are free to create your own build configurations via the Configuration Manager. Check out some of her old blog posts on how the Configuration Manager works, if you want to create your own custom build configurations: http://saraford.net/2005/08/16/did-you-know-how-the-configuration-manager-works-part-1/ and http://saraford.net/2005/08/18/did-you-know-how-the-configuration-manager-works-part-2/.

If you are using a custom build configuration and you uncheck the Show Advanced Build Configuration check box, Visual Studio will pretend you still have it checked, enabling you to still open the Configuration Manager.

When you are working in Simplified Build Configuration mode, the following happens behind the scenes:

  • F5 (Debug.Start) runs under the debugger in the Debug configuration. This means that the binaries will be produced in a Debug folder in the output file path.
  • Ctrl+F5 (Debug.StartWithoutDebugging) runs (with no debugger) in Release configuration. This means the binaries are produced in a Release folder in the output file path.

If you change the Build output path (for example, bin\myRelease) and use Debug. StartWithoutDebugging (Ctrl+F5), Visual Studio builds the release in the myRelease folder. But if you press F5, Visual Studio still puts it in the Debug folder.

From a UI perspective, Visual Studio hides all access points to the Configuration Manager when in Simplified Build Configuration. For example, the Configuration (Release or Debug) and Platform (Any CPU, and so forth) options disabled on the standard toolbar.

Additionally, the Configuration Manager command disappears on the Solution Explorer context menu, and Configuration and Platform disappear from the Project Properties–Debug page.

And that’s more than she ever wanted to type about Simplified Build Configurations, and probably more than you ever wanted to know, but at least now you understand what that little option does. =)

Happy Programming! =)

Advertisements
Leave a Comment

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: