apacay
apacay

Reputation: 1712

How to switch between debug/release in Visual C# 2008 Express

I saw How to switch between debug and release in Visual C# Express 2010?, but this didn't give me a clue of how to do it in Visual C# 2008 Express, since there is no such "Expert Settings".

@@Edit: Express Edition, my friend.

Express

@Edit: There is no "Build Menu"

No build Menu

@Edit: This is my "Options Menu"

This is my Options Menu

@Edit: And last but not least, this is my solution properties window. You can also see that the Debug/Release Combo is disabled.

This is my Solution Properties Window

Upvotes: 2

Views: 2416

Answers (3)

Sean Werkema
Sean Werkema

Reputation: 6125

This same problem irritated the heck out of me, but after poking around on Microsoft's website for a while, it is in fact solvable. Visual C# 2008 Express Edition does, in fact, let you switch build configurations explicitly, and offers a lot of the options and settings that Visual C# 2010 does. They're just all buried under an easily-overlooked configuration setting. Here's how to unbury them:

Step 1. Go into Tools / Options. By default, Microsoft has it set to not show you 90% of the available settings. Lord knows why, but that's what they did. So first, make sure that "Show all settings" is checked or you'll be running Visual Studio with the training wheels still on:

Options dialog with "Show all settings" checked

Step 2. You now have a whole bunch more Visual Studio options, and Express is now a lot closer in its functionality to the real thing. So under the now unhidden "Projects and Solutions" section, there is a checkbox you need to check labelled "Show advanced build configurations." Turn that on, and hit OK.

Options dialog with "Show advanced build configurations" checked

Now that you have the training wheels taken off, the build dropdowns in the Standard toolbar should show both Debug and Release options, as well as offering you access to the full Configuration Manager:

Standard Toolbar with configurations and the Configuration Manager enabled

Enjoy!

Upvotes: 6

Rich O'Kelly
Rich O'Kelly

Reputation: 41757

There's a drop down list of build configurations in the top bar above the code editor window.

Alternatively, you can use the Configuration Manager, accessible via Build->Configuration Manager.

You can also set the build configuration option when building from the command line:

MSBuild.exe "yourSolutionFilerHere.sln" /property:Configuration="Debug"

Upvotes: 1

ek_ny
ek_ny

Reputation: 10243

Right click on properties in Solution Explorer. Select debug configuration for build settings. You can also right click on the build menu for solution and select configuration manager in order to choose the mode for each project separately.

Upvotes: 1

Related Questions