Conditional Compilation

There are 1 entries for the tag Conditional Compilation

Conditional Compilation Constants and ASP.NET

UPDATE: K. Scott Allen got to the root of the problem. It turns out it was an issue of precedence. Compiler options are not additive. Specifying options in @Page override those in web.config. Read his post to find out more. Conditional compilation constants are pretty useful for targeting your application for a particular platform, environment, etc... For example, to have code that only executes in debug mode, you can define a conditional constant named DEBUG and then do this... #if DEBUG //This code only runs when the app is compiled for debug Log.EverythingAboutTheMachine(); #endif It’s not common knowledge to me that these constants...