How do I know if its compiled for release?

  • Thread starter Thread starter Scirious
  • Start date Start date
S

Scirious

People, how do I know if my software is comiled for debug or release? And
how do I compile for release?

TIA,
Scirious.
 
Scirious said:
People, how do I know if my software is comiled for debug or release? And
how do I compile for release?

TIA,
Scirious.

Hi Scirious,

You can conditionally compile a constant, somewhere in a source file.

///
#if DEBUG
public const bool IsDebug = true;
#else
public const bool IsDebug = false;
#endif
///

To compile for 'Release', choose 'Release' from the drop-down menu that
should contain the word 'Debug', on your main toolbar. The difference
between 'debug' and 'release' is simply a configuration thing... It's the
command-line options that are passed to the compiler. That is, in the
release build, you'll probably have debugging turned off, and optimisation
turned on.
 
Thanks, but I'm using Visual C# Express Edition and I don't see any place
to chose release. The drop-down list here is disabled!
 
Goto tools, and uncheck the box that hides advanced options (right on
the first tools screen).

Andy
 
Goto tools, and uncheck the box that hides advanced options (right on
the first tools screen).

Sorry, but i don't see such option. Are you sure it exists in the Express
Editions?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top