Always build in release mode

by samantha copeland on June 14, 2014

Make sure that if you are building the solution from code you compile in Release Mode. The assemblies provided in the download file are built in Release mode, but if you are building the solution yourself, there is potential that you are building in Debug mode. Debug is fine if you are trying stuff out and are still on a local non-production system, but if you have published your website to the public, you should be sure to build in Release mode before publishing.

Not sure if your site was built in Release? Just view source and look for the meta tag for generator. If it says "DEBUG MODE" you should rebuild.

<meta name="generator" content="CarrotCake CMS #.#.####.##### DEBUG MODE" />

The version is also printed below the c3 admin logon box and footer in the admin area.

MSDN: How to - Set Debug and Release Configurations
ScottGu's Blog - Don’t run production ASP.NET Applications with debug=”true” enabled

Not only will errors that do happen from time to time show less information and help protect you from hackers, but the code will be more optimized. In debug mode, there is some caching that the framework does not perform, as well as database tracing in the CMS code itself that will be very chatty and could hurt site performance if not turned off. Building in Release will help with caching and turning off the database tracing.