Switch Console- vs. Windows-Mode for Release vs. Debug Build (VS20

Switch Console- vs. Windows-Mode for Release vs. Debug Build (VS20

Post by U2VhbiBOZW » Wed, 17 Jun 2009 07:24:02


In C# I'm writing debugging messages by using Console.WriteLine and building
my program in Console mode. To build the program as a console mode
application I right-click the project in Solution Explorer, choose
"Properties", click the "Application" tab, and set the "Output Type" to
"Console Application".

I'd like to build the program as a "Windows Application" in release mode,
but the "Configuration" listbox is greyed out for the "Application" tab of
the project properties.

Short of manually changing the output type every time I build the project,
is there a way to have the program build in Console mode for the Debug
configuration and in Windows mode for the Release configuration?