Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When publishing an ASP.NET application, should I change the build type to Release in the Visual Studio Configuration Manager?

For my production sites I usually change the "debug" flag in the Web.Config to "false". But I always publish my sites with the Configuration Manager set to "Debug". Should I change this setting too?

like image 339
Jader Dias Avatar asked Mar 13 '09 14:03

Jader Dias


People also ask

What is Release mode in Visual Studio?

Visual Studio projects have separate release and debug configurations for your program. You build the debug version for debugging and the release version for the final release distribution. In debug configuration, your program compiles with full symbolic debug information and no optimization.

What is the difference between Release mode and debug mode in Visual Studio?

By default, Debug includes debug information in the compiled files (allowing easy debugging) while Release usually has optimizations enabled. As far as conditional compilation goes, they each define different symbols that can be checked in your program, but they are language-specific macros.

What is build configuration in Visual Studio?

Applies to: Visual Studio for Mac Visual Studio. Build configurations give you precise control over a build allowing you to create configurations to cater to different testing and distribution situations. You can create build configurations for individual projects or on a solution-wide basis.

Is Release build faster than debug?

Lots of your code could be completely removed or rewritten in Release mode. The resulting executable will most likely not match up with your written code. Because of this release mode will run faster than debug mode due to the optimizations.


1 Answers

Yes, you should - though if it makes a difference is dependent on how your website is coded. Only precompiled sites (Web Application Projects) or Class Libraries in the same solution will care. ASP.NET sites (Website Projects) will be compiled on the server, and will check web.config for it's debug setting.

like image 64
Mark Brackett Avatar answered Nov 15 '22 14:11

Mark Brackett