folks,
i have a web project where the Release configuration shows DEBUG constant defined in various #if DEBUG statements. this is not only visually in IDE but in the actual generated assembly as well.
of course, i made sure the "Define DEBUG constant" box is un-checked for Release.
has anyone run into this
thanks...
g

DEBUG constant in effect for Release configuration
Farzad E.
we're really talking about two different types of compilation here; first is static compile performed when Build is done (of course, on the development host) and whose output is the project assembly. second is dynamic compile of asp.net pages performed (on the target server) when they are loaded. this is where the <compilation directive applies.
so, my issue with DEBUG constant is relevant only in the first compilation.
i do appreicate your input; i only wish that Microsoft engineers would offer some insight.
David Xiong
I can't speak to the possibility of it being an upgrading snafu as I am not much of an ASP.NET person... what about in your web.config file (or other .config file being used for this app)... any chance you've got the following in there:
<compilation debug="true"/>
If not... one alternative would be to throw this into your machine.config file:
<configuration>
<system.web>
<deployment retail="true"/>
</system.web>
</configuration>
With this you effectively nuke the server's ability to run things in debug mode, prevent trace outputting of any kind and custom error messages. It might be a little extreme but it could help you track this down better as sadly I am fresh out of ideas of the compilation mode isn't set to debug mode.
If all else fails, try stopping by the ASP.NET forums where people there spend a lot more time living and breathing ASP.NET.
Robert_Frei
Can you please check the following I only have VS2005 installed, but I think it's the same in VS2003:
1) Right click "Solution '<Your Solution Name>'" in the Solution Explorer and click properties.
2) Look at the second property called "Active config." Make sure it contains the word "Release" and does NOT contain the word "Debug."
3) If the "Active config" is "Debug" click the combo box and select "Release."
If the steps above didn't work in VS2003, make sure your built binaries are being placed to ".\obj\release" and not ".\obj\debug." If your binaries are being placed in "Debug" make sure the active config is "Release."
The IDE is a little bit confusing -- there is a combo box that lets you change how the Release and Debug configurations work, but this combo box has no effect on which configuration the solution actually builds. You need to use a different combo box to actually set the active config.
David Smith from MSU!
no chance;
the symbol box is just above the checkbox, so it'd be hard to miss besides the fact that one would really have to go out of one's way to define DEBUG for a release configuration.
my only hint (which i've not proven) is that this may happen for those vs2003 projects migrated to vs2005 via the wonderful wizard; but this type of juvenile development anomalies should just not occur on a so-called Professional product.
Viktorio
finally, you've led me to right track! actually, the problem was due to Active(Release) configuration had project configurations set to Debug. after setting them back to Relase, #if DEBUG behaves as expected.
so, question arises: how did Release solution setting end up having Debug projects my strong hunch is the vs2003-to-vs2005 migration wizard.
thanks for your insight... of course, i must have looked at the configuration page a hundred times but never noticed the problem!
Silvina