views:

65

answers:

2

Hi,

I just created a new project configuration.

I named it 'Blah' So no 'debug' in it.

Now how does Visual Studio know when to compile a debug file or a release file.

is this merely defined by the DEBUG constant?

Or am I wrong? :)

Thanks

I'm using C#, with Visual Studio 2008.

Thank you for your answers.

I read that I need to define full debug info, how do I do that?

Short: if I define DEBUG, it's a debug build? Right?

A: 

Yes, a simple Compiler Constant can control how your application is built.

You must know how to use configurations. See Build Configurations at http://msdn.microsoft.com/en-us/library/kkz9kefa(VS.90).aspx.

Build Configurations

Build configurations provide a way to store multiple versions of solution and project properties. The active configuration can be quickly accessed and changed, allowing you to easily build multiple configurations of the same project.

By default, and projects created with Visual Studio include Debug and Release configurations. Debug configurations are automatically configured for debugging an application, and Release configurations are configured for the final release of an application. For more information, see How to: Set Debug and Release Configurations. You can also create and edit your own custom solution and project configurations to meet the needs of your application. For more information, see How to: Create and Edit Configurations.

AMissico
+2  A: 

It doesn't compile a debug file or a release file; it compiles a Blah file. "Debug" and "Release" are just shorthand labels for a number of settings. E.g. the "Release" configuration includes optimization settings, whereas the "Debug" setting includes the generation of a PDB, and the preprocessor definition of DEBUG

Your Blah build configuration could be 50% debug, 50% release, if it mixes these settings. Some settings aren't even boolean, and thus your config could be unlike either.

MSalters
Thank you, this answers it :)
Snake