This project is read-only.

Release Mode Configuration

Nov 19, 2010 at 11:45 PM

Curious, is BlogEngine set to Release mode when it's released for each version? The reason I ask is for the reasons outlined on a few sites:

My main concern is with caching. In debug mode, ASP doesn't tell scripts and other axd handlers to cache their output.

I understand the reason to keep the main trunk in debug mode for people wanting to experiment with the code, but it might be helpful if, say, in the admin panel there were an alert saying "Currently running in Debug mode." and list off some reasons for wanting to make sure that your site's compiled in release mode when live.

Nov 20, 2010 at 2:42 AM

I'm almost certain that when we put out the releases, they are released in Release Mode.  At least I remember us doing that for BE 1.6.  I'm not sure about 1.6.1.  We'll need to be sure to set it for Release mode when releasing 2.0.

I know you can use:

... to check if <compilation> mode is set for Debug or Release (it'll be true if in Debug mode).  The files in the website (outside the core) are unaffected by compiling in Debug or Release mode (these files aren't compiled).  I'm not sure offhand a way to programmatically determine if the BlogEngine.Core.dll was compiled in Release or Debug mode.  Probably using Reflection would be necessary, if at all possible.

Nov 20, 2010 at 2:59 AM

Oh, that'd be as simple as putting a property into the Utils class or somewhere else:


 public static bool IsDebugMode
             return true;
             return false;


I'm mostly concerned about the website project itself. The caching issue's definitely important.

Nov 20, 2010 at 3:08 AM

Good point there with the DEBUG code.

The 1.6.1 release on the releases page has debug="false" in the web.config file:

<compilation debug="false">