I'm having the same problem. Using the compiler directive #IF DEBUG
around my code, works when debugging, but when I set the
<compilation defaultLanguage="c#" debug="false">
in web.config for release build, the debug statements still run, ie the
DEBUG constant is still set to true.
Any thoughts or alternative solutions anyone?
Scott Allen wrote:
On Tue, 1 Nov 2005 16:51:26 -0500, "Brian Henry" <no****@nospam.com>
wrote:
thast what I always did in .NET 1.1 and 1.0 but in 2.0 that doesn't work any
more when you have #if debug directives in it for some reason... my #debug
code always runs release or debug build
Right - those options aren't available in 2.0.
Are you using a filed based web site or one in IIS? I can see my code
not executing inside #if DEBUG if I turn debugging off and run with
CTRL-F5. Perhaps you could clean out the Temporary ASP.NET files
directory and see what happens.
--
Scott
http://www.OdeToCode.com/blogs/scott/