Differences between Debug Assembly and Release Assembly
For compiling project., Debug and Release modes are different configurations
we generally use the Debug mode while debugging project. But while releasing code into production environment i.e. for final build, we should compile it in Release mode for end users deployment.
If you compile in debug (/debug+), the Debuggable attribute is added to the assembly.
The main difference is that Debug mode does not optimize the binary it produces, as it is debugging quite complicate , and generates additional data to aid debugging. i.e. it generates pdb file (program debug database), which holds all debug related information like breakpoints, assertions etc, and maps breakpoints to the execution addresses.
While, Release mode enables optimizations and generates less or possible not, extra debug data.
In the debug assembly, the IsJitOptimizerEnabled property is True, in the release assembly it is False. we can check this attribute using ILDASM.exe utility in assembly manifest. JIT compiler uses this attribute to disable optimizations for debug mode.
If you wish check assembly version, please add this code in the AssemblyInfo.cs file:
#if DEBUG [assembly: AssemblyDescription("Debug")] #else [assembly: AssemblyDescription("Release")] #endif
It will specify whether its DEBUG assembly or RELEASE assembly.
After compiled to Assembly file (.dll or .exe), right-click the file and check its version property: Comments item is Dubug or Release.
|
No responses found. Be the first to respond and make money from revenue sharing program.
|