且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Debug Dll和Release Dll之间的区别

更新时间:2022-06-05 02:19:06

我认为您是指Microsoft.Net程序集.最大的区别是性能.在调试dll中,添加了一些额外的说明,使您可以在例如Visual Studio中的每个源代码行上设置断点.同样,代码也不会被优化,再次使您能够调试代码.

在发行版中,这些额外的指令已删除,编译器完成了一些额外的优化.例如,尝试在Visual Studio中调试发行版的汇编程序集,您会发现不允许在每一行上设置断点.

至于不确定的部分,也许您可​​以使用ildasm看到它,并检查是否有nop等额外说明.
I think you are referring to Microsoft.Net assemblies. The biggest difference is performance. In a debug dll several extra instructions are added to enable you to set a breakpoint on every source code line in for example Visual Studio. Also the code will not be optimized, againg to enable you to debug the code.

In the release version these extra instructions are removed and several extra optimizations are done by the compiler. Try for example debugging a release compiled assembly in visual studio, you will notice that you are not allowed to set a breakpoint on each and every line.

As for the identifying part I am not sure, maybe you could see it using ildasm and check of the extra instructions such as nop are there.


希望 ^ ]可能会为您提供帮助.
Hope this[^] might help you.


阿伦印度写道:

 &nbsp ; 1. Debug Dll和Release Dll有什么区别.

   1. What is the Difference between a Debug Dll and Release Dll.


答案1)如果它用dll包含pdb文件的xml文件,则它处于调试模式,否则处于发布模式.


Answer 1) if it conatains xml files of pdb files with dlls then it is in debug mode otherwise it is in release mode.

阿伦印度写道:

   2.如果我有一个Debug Dll,它在运行应用程序时有什么帮助.另外,我如何识别特定的dll是释放dll或调试dll.

   2. If I have a Debug Dll, how it helps while running the application. Also how I can identify a particular dll is release dll or debug dll.


答案2)包含在DLL文件中的程序集信息将存储是否以deug或release模式编译.
这是用于获取装配信息的第三方软件:
.NET组装信息 [ ^ ]

参考 Link- [debug&释放DLL] [ ^ ]


Answer 2)The assembly information include in the DLL files will store whether it is compiled in deug or release mode.
Here is a Third-party software for getting assembly info:
.NET Assembly Information[^]

Reference Link-[The difference between debug & release Dll] [^]