ASP.NET: #if DEBUG not working / still runs in production

Debug code still running in production after building in RELEASE mode (I think this is a msbuild problem)... Example:
#if DEBUG
//blah blah
#end if
Solution:
Switch to using something like this:
public static bool IsDevelopment
{
    get
    {
        return HttpContext.Current.IsDebuggingEnabled;
    }
}
This method uses the web.config defined attribute instead (configuration/system.web/compilation[debug="true"] attribute).