我怎么能知道一个DLL是不是一个调试版本版本、我怎么能、DLL

2023-09-03 02:48:21 作者:发骚只因荷尔蒙过多°

我如何确知我的生产服务器使用发布版本的DLL。有没有一种方法来发现里面DLL的信息?

How do i know for sure that my production server uses release build dll's. Is there a way to find that info inside dll?

的复制:

How说,如果.NET应用程序是在调试或发布模式下编译?

如何检查是否DLL是调试编译

推荐答案

如果是C#DLL那么你可以使用反汇编(程序Files \ Microsoft的SDK \的Windows \ v6.0A \ BIN \程序Ildasm.exe)来找出此信息。

If it is a c# DLL then you can use ildasm (Program Files\Microsoft SDKs\Windows\v6.0A\bin\ildasm.exe) to find out this information.

1)拖动DLL到ILDASM

1) Drag DLL into ILDASM

2)的清单后海湾干线单击

2) Dbl-Click on the MANIFEST

3)寻找:

// .custom实例无效[mscorlib程序] System.Diagnostics.DebuggableAttribute ::。ctor的(值类型[mscorlib程序] System.Diagnostics.DebuggableAttribute / DebuggingModes)=(01ンンンンンンン)

// .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 nn nn nn nn nn nn nn )

4)为调试的DLL这将是(01 00 07 01 00 00 00 00),并释放  (01 00 02 00 00 00 00 00)或(01 00 03 00 00 00 00)

4) For DEBUG DLLs it will be ( 01 00 07 01 00 00 00 00 ) and for release (01 00 02 00 00 00 00 00) or (01 00 03 00 00 00 00)

让我知道如果你需要任何进一步的信息!顺便说一句这显然非编程解决方案。

Let me know if you need any further info! BTW This is obviously the non programmatic solution.