Author: Unknown Author speed Please contact me a few days ago to see the article explains how to know tofu assembly is Debug or Release version version before just know there are some software from the Enterprise Edition features, the standard version of the points, but never I know that the .NET assembly also has the difference between Debug and Release, is really awkward. Then in the question area of the blog garden, I sent a discipline, two days, no one, no one, or too lazy, to review it), I have to turn my MSDN, use Google Search, now I have a little understanding.
About Debug and Release, MSDN say this: Visual Studio project has a separate configuration on the publishing and debugging version of the program. As the name suggests, the purpose of generating debug versions is to debug, and the purpose of generating a release version is the final distribution of the version. If you create a program in Visual Studio, Visual Studio will automatically create these configurations and set the appropriate default options and other settings. Under the default setting: The "debug" configuration of the program is compiled with all the symbol debug information and not optimized. (Optimization makes debugging complications, because the relationship between source code and generation is more complicated.) The "release" configuration of the program is fully optimized, and does not contain any symbol debug information. The debug information can be generated in a separate PDB file.
When you select a debug mode in the properties page of the assembly:
When you select Release mode, set it as follows:
The difference between the two is as follows:
Project DEBUGRELEASE Condition Compiling Constant Debug; TraceTrace Optimized Code Falsetrue Output Path BIN / Debugbin / Release Generate Debugging Information Truefalse
The assembly generated in Debug mode is a debug version, not optimized; two files in the bin / debug / directory, except for the .exe or .dll file to be generated, there is a .pdb file, this .pdb file In recorded the debugging information such as breakpoints in the code; the debug information is not included in the Release mode, and the code is optimized, and only one in / release / directory has only one .exe or .dll file.
Note To change the generating mode of the project, you cannot only work from the Project Properties page, you don't work, you don't work, you must change the "Configuration Manager" button in the upper right corner to change.
Now I have a question: In the project folder, in addition to bin, there is an OBJ directory, and there are DEBUG and RELEASE two subdirectories. This is not known to do it.