I'm only publishing in debug mode to test on my local machine and I was hoping the '#if debug' mode would work so that I could test features that I don't want in production yet.
When I publish in debug mode the web.config still has
<system.web>
<compilation debug="true" targetFramework="4.0">
</system.web>
but when I use reflector on the project's dll the code that was like this
#if debug
PlaceHolder1.Visible = true;
#endif
is non-existent. I figure the compiler has removed it.
NOTE: I'm NOT talking about a build, I'm talking about publishing. Doing a debug build works as I expect it to with the code above still present
Is this expected behavior? Is there a way to get the compiler to include those bits of code when I'm publishing in debug mode? Am I going about this all wrong?
Update: In response to @dash's comment my Package/Publish Web settings are:

C# preprocessor symbols are case-sensitive. Try:
#if DEBUG
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With