怎么区分.net dll编译时是Debug的还是Release的?

    博文《[你必须知道的.NET]第三十五回,判断dll是debug还是release,这是个问题》中讲述了如何判断dll是Debug编译的还是Release编译的。

    实际上通过Reflector反编译dll时也能发现assembly中Debuggable属性的一些差别。

    Release编译的dll显示如下:

image

   而Debug编译的dll将显示:

[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.EnableEditAndContinue | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.Default)]

原文地址:https://www.cnblogs.com/qguohog/p/2174907.html