Claus Thomsen
Claus Thomsen

Reputation: 2355

How can I know a dll is not a debug build

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?


Duplicate of:

Upvotes: 5

Views: 3741

Answers (2)

GvS
GvS

Reputation: 52518

In your AssemlyInfo.cs you can include the following:

#if DEBUG
[assembly: AssemblyDescription("Your description - Debug")]
#else
[assembly: AssemblyDescription("Your description")]
#endif

This will make it easy to see, when using the build in properties dialog on File Explorer.

Upvotes: 2

Duncan Edwards
Duncan Edwards

Reputation: 1558

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) Drag DLL into ILDASM

2) Dbl-Click on the MANIFEST

3) Look for:

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

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.

Upvotes: 12

Related Questions