Difference between the Debug version and the Release version of the Class Library Project, debugrelease
Debug version: it is usually called a Debug version. It contains debugging information without any optimization and facilitates programmers to Debug programs.
Release Version: it is called a Release version. It is often optimized to optimize the code size and running speed, so that users can use it well.
In fact, there is no essential limit between the Debug version and the Release version. They are just a set of compilation options, and the compiler only acts according to the predefined options. In fact, we can even modify these options to get optimized debugging versions or release versions with trace statements.
In the Debug or Release folder, you can see several types of files:
1. application extension files: dll files (dynamic link library );
2. XML document type file: This File Stores comments such as classes, methods, and parameters in the dll file. If this file is not available, you cannot view the help information in intelisense when using classes and methods in the dll file;
3. Program Debug Database [Program Database ]:
A. The sequence database file stores debugging and project status information, which can be used to incrementally link the debugging configuration of the program. When/Debug or/Release is used to generate a PDB file;
B. Use/debug: full or/debug: pdb-only to generate the application. Use/debug: full to generate debugging code. Use/debug: pdbonly will generate PDB, but will not generate DebuggableAttribute that notifies the JIT compiler of debugging information available. If you do not want to debug the released version, use/debug: PDB-only for the generated pdb file;
C. The isual Studio debugger uses the PDB path in the EXE or DLL file to find the project. pdb file. If the debugger cannot find the PDB file at this location or the path is invalid, the debugger searches for the path containing the EXE and then searches for the path specified in the "options" dialog box. This path is usually the "debug" folder in the "symbol" node. If the debugger cannot find the. PDB file, the "Search for symbols" dialog box is displayed, which allows you to search for symbols or add other locations to the search path;
D. There are pdb in the Debug folder and the Release folder. The difference is that the pdb in Debug is full, saving debugging and project status information, and providing Code such as assertions and stack checks; the pdb in Release is pdb-only, and the saved information is the error and the error line;
E. If you do not want to generate a pdb file when generating the file, you can generate it in the project properties-advanced-debug information-select none;
Note: I personally think that when releasing a project, the file should be generated in the Release mode, and the pdb file should be generated in the form of pdb-only for emergency purposes. Of course, the final selection of pdb-only and none depends on the specific situation.