Debug and Release in Visual C# Express

Programming Add comments

If you haven’t realized yet, Microsoft has published free, trimmed-down versions of the Visual Studio 2005 IDE. These versions are tightly bound to one language, currently available are Visual C# Express, Visual C++ Express and (damn!) Visual Basic Express. As much as I would want to recommend SharpDevelop at the moment the Visual Studio IDE is just far more productive.

So what means trimmed down? Is it cripple-ware? Not at all! I have worked with the full Visual Studio 2005 and most of the time, I don’t even notice the difference. Some advanced enterprise tools are gone, but if you need those, you also have the money to buy the Professional Edition.

Also gone is the UML class designer. This is a bit sad, but there are free tools you can use as a replacement. Check out UML Sculptor which is really great for quick drafts.

What annoyed me a bit, thought, was that the default setup doesn’t let you switch between ‘Debug’ and ‘Release’ mode (debug mode creates unoptimized binaries suitable for debugging and release mode creates lean, fast binaries suitable for distribution to the end-user). The Express Editions do it like this: A release build is done when you press Ctrl+F5 (run without debugging) and a debug build is done when you press F5 (run in debugger).

You can, however, make the Express Editions behave like the big Visual Studio by opening the ‘Extras’ menu, choosing ‘Options’, then navigating to ‘Projects and Solutions’ where you enable ‘Show advanced build configurations’ (make sure ’show all settings’ is selected):

Advanced build configuration switches in Visual C# Express

This also allows you to set the working directory to use when the program is launched without debugging (Ctrl+F5).

16 Responses to “Debug and Release in Visual C# Express”

  1. Matt Hamilton Says:

    Thanks for this, Cygon, and thanks for leaving a pointer to it on my blog.

  2. Joe Nelson Says:

    Thanks, I would never have found this without your post. I don’t know why Microsoft disables the Release mode by default.

  3. Extras menu Says:

    Hi!

    Where can i find that Extras menu??

    You can, however, make the Express Editions behave like the big Visual Studio by opening the ‘Extras’ menu, choosing ‘Options’, then navigating to ‘Projects and Solutions’ where you enable ‘Show advanced build configurations’ (make sure ’show all settings’ is selected):

  4. cygon Says:

    Hrm? Just launch Visual C++ 2005 Express and look for the menu bar on top of the screen.

  5. mendo Says:

    Tools - Options :)
    (there’s no Extras menu in Visual C# 2005 Express, at least in mine…).

    Thanks cygon! I used to edit .csproj and .sln to enable build configurations.. that’s QUITE more simple ^_^

  6. Palani Says:

    I too don’t see the “Extras menu in Visual C# Express… But, your post was very helpful. thanks.

  7. Adam Says:

    I recently downloaded MSVC# 2005 Express Edition, and I don’t actually see the ‘Projects and Solutions’ folder, just ‘Environment’, ‘Text Editor’, and ‘Debugging’. Perhaps Microsoft hid ‘Projects and Solutions’ in response to this blog post? Or am I just and idiot and missing something? Thanks!

  8. cygon Says:

    @Adam: I think Microsoft provided these options intentionally and just disabled them in order to not confuse beginners.

    You won’t get to see the ‘Projects and Solutions’ folder until you clicked on ‘Show all settings’ (in the lower left). Guess I should better have numbered the red markers in the picture :)

  9. scotru Says:

    Very helpful! Thanks!

  10. Al Says:

    Thanks! Just what I was looking for. In VC# Express 2008 it is under Tools | Options….

    Thanks again!

  11. Mr Latté Says:

    Very helpful - many thanks.

  12. Welby Says:

    Look under the Tools menu at the top instead of the Extra menu. I have no extras menu on my version. Otherwise, the rest of the artical was correct, and very helpful. I looked for that damn setting for about an hour before I found your post. Thanks.

  13. Sk Says:

    Hi Cygon! Your post was helpful but didn’t solve my problem: when I try to enter debug mode (setting Debug configuration, pressing F5 to launch or F10 to step) I get an error saying that the binding handle is invalid. I’m using VC# 2005 Express (no problem debugging VC++ 2005 Express instead).

  14. Sk Says:

    Hi again! Sorry to double post, but I found the solution myself and I thought I’d post it for all those interested. I could fix the problem by going to the project options and deactivating ” Activate Visual Studio hosting process” (I can’t guarantee about the English wording, I use the Italian version) in the “Debug” tab. Have a nice day!

  15. A New Fan Says:

    Thank you for helping me find the kill switch on this ludicrous nerfing.

  16. Free asp and asp.net scripts Says:

    Yes, same in 2008 Express. Thanks for publishing this so I can compile in release mode. I personally think VS Studio is too bloated, so the Express versions are my selected road.

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Login