Conditional compile based upon Active Configuration

  • Thread starter Thread starter SStory
  • Start date Start date
S

SStory

I would like to have some code compile if my Active Configuration is set to
debug and not compile if it is set to Release.

I don't want to have to remember to define a constant. I just want to
change configurations and all debug code not execute.

How is this possible.

Thanks in advance,

Shane
 
SStory said:
I would like to have some code compile if my Active
Configuration is set to debug and not compile if it
is set to Release.

I don't want to have to remember to define a constant.
I just want to change configurations and all debug code
not execute.

\\\
#If Debug Then
...
#End If
///

Select the project in the project explorer, select the "Project" menu ->
"Properties" -> "Configuration Settings" -> "Build" -> "Define DEBUG
constant" (translated from the German language version of VS.NET 2002).
 
cool , I found it.
Thre is a checkbox that says Defin Debug Constant already checked in the
debug configuration.
That is what I wanted to do.

I can't always remember to define one. This will be helpful. Keep me from
burning a CD with Debug code still in.

Danke Herr Wagner, Guten Aben (I think good evening... not sure.... I
remember, Guten Morgan,Guten tag, Guten Aben...)

Shane
 
SStory said:
Danke Herr Wagner, Guten Aben (I think good evening... not sure.... I
remember, Guten Morgan,Guten tag, Guten Aben...)

"Guten Abend", "Guten Tag", "Guten Morgen"

;-)
 
Back
Top