How to switch between debug and release in Visual C# 2010 Express?

59,694

Solution 1

  1. Enable the ToolsSettingsExpert Settings menu option

  2. Go to ToolsOptions
    In the dialog box, check Show All Settings option in the bottom left.

  3. In the above dialog, now choose Projects and SolutionsGeneral.
    Check the option Show advanced build configurations.

  4. Click OK.

You should be able to see the Release/Debug options in the toolbar now.

Solution 2

Heh, that one baffled me too when I first installed Visual C# Express 2010. It turns out Microsoft has added a "Basic settings" mode to the Express editions that is selected by default.

You can change to "Expert settings" mode in the Tools menu, after that, the Debug/Release combo will be back.

Expert Settings in Visual Studio's Tools menu

Most IDE settings (window docking locations, font settings, etc.) seem to be kept in separate profiles between basic and expert mode, so you'll have to arrange your tool windows again and so on.

Solution 3

I'm sure there's some obscure way that I don't remember... what I do know is that if you click "Build" it will build the Release version, but if you click "Start Debugging" it will build the Debug version. So if you just want to be able to get the output from both versions, that should sort it for you.

Solution 4

You can follow these steps for visual studio 2010 professional edition.

  1. Go to Tools -> Customize .
  2. Select Commands Tab.
  3. Select ToolBar and then Build from combobox.
  4. Click on Add Command Button.
  5. Select Build from Categories and then select Solution Configurations from Commands.

Solution 5

This is really strange. I've installed Windows 7 Pro x64, then I installed Visual C# 2010 Express and I couldn't find it at all. No matter how I built, it always produced Debug version. I could press F6 or press Build button and it still produced Debug version and I don't have any select box with Debug/Release to choose.

Finally I found it. I can change it by clicking my Soulution in Solution Explorer window and then in Properties window under Active Config.

Share:
59,694
Thiago Padilha
Author by

Thiago Padilha

programmer

Updated on July 05, 2022

Comments

  • Thiago Padilha
    Thiago Padilha almost 2 years

    How do I switch between debug and release in Visual C# 2010 Express?

    I have looked in the project properties, but it seems to be missing. What am I missing?

  • stakx - no longer contributing
    stakx - no longer contributing almost 14 years
    A completely unrelated question @Cygon: I'm curious how that screenshot was taken. It looks very clean and tidy! Is there a special utility for that sort of screen capturing?
  • Cygon
    Cygon almost 14 years
    Not that I know of. I'm just really pedantic with such things - in this case I used Paint Shop Pro's 'Screen Capture' and copied & pasted clean parts of the drop shadow over where it was distorted by stuff in the background :P
  • Juan
    Juan over 13 years
    I've been looking for that too. The weird thing is that all this time I didn't know how to change the configuration but apparently the program was building both every time. Then I installed Windows 7 and when reopened my project I couldn't get to build the release version. Until the active configuration miraculously changed to Release for mysterious reasons. Then I couldn't put it back on debug until I found this thread. Does anyone know how come my VC# was building both configurations and how to make it do that again? It was quite handy.
  • Qwertie
    Qwertie about 13 years
    Damn, this does not work for me in VC#E 2010. The toolbar does not change. The only way I can get a Release build is to build the solution in "Basic Settings" (or run the project without debugging in Basic Settings mode). In Expert Mode, it produces Debug builds only no matter what.
  • Qwertie
    Qwertie about 13 years
    Oh crap, I switched back to Basic Settings and now even Basic Settings won't ever produce Release builds, even if I uncheck Show advanced build configurations. Oh well, at least I can still produce Release builds with SharpDevelop. But they don't offer that nice configuration switcher in their toolbar.
  • Wes P
    Wes P almost 13 years
    Wow. This is the most complete answer to this question that I've found. Kind of annoying when all I wanted to do was just set the output directory for a debug build.
  • Artfunkel
    Artfunkel almost 13 years
    We actually don't need to worry about this 98% of the time. Running a project with F5 always creates a debug build, while building with F6 always makes a release build.
  • walther
    walther over 11 years
    Thank you! Funny thing is that this alone still wasn't enough. I had to combine your answer with the one from from Siege, but alas, it works. Finally...
  • Piotr Kula
    Piotr Kula almost 11 years
    Makes sense? But what if I want to to debug using the release configuring (Azure database instead of local and other stuff without manually changing the normal debug webconfig?)
  • Jon Skeet
    Jon Skeet almost 11 years
    @ppumkin: Does the accepted answer help you? If not, I suggest you might want to ask a separate, more detailed question.
  • Piotr Kula
    Piotr Kula almost 11 years
    No - I searched around for a while something strange is happening. Changing the build configurations to anything always uses debug - If i cant find the solution I will ask a new question. Thanks for reply +1
  • Bitterblue
    Bitterblue almost 11 years
    @JuanLuisSoldi 3 years later: I had the experience that when I press F6 to build. It created Release. When I pressed F5 to start debugging it build the Debug and started it right away. I liked this setting until now it's broken and only one can be created.