views:

55

answers:

2

Hi,

I have a 3rd party DLL that I need to use in my application. My project is signed with an SNK so therefore I cannot use these unsigned DLLs without signing them.

I tried to use ildasm.exe as explained here but I get error messages when attempting to sign the DLL as the DLL contains unmanaged code. The error message I get is "the resulting PE file is unusable" (the DLL uses P/Invoke calls).

Any ideas what I can do here?

+5  A: 

The simplest approach is to rebuild the DLL with a key. You haven't told us anything about the 3rd party DLL... if it's a commercial library, I'd expect the company involved to be happy to give you a signed binary. If it's an open source library, you can do that yourself.

If you have no way of getting hold of a "normal" signed binary, perhaps you could give more details about the situation?

Jon Skeet
I have asked the company that owns the DLL (it is comercial) to supply me with a signed binary and am awaiting their response. Is there nothing else I can do? What further details would you require in this case? Thanks!
Vixen
@Vixen: Knowing it's commercial is the detail we were missing. I would be *very* worried if they weren't willing to give you a strongly-named binary - I'd take that as a sign that they're not actually serious about their software.
Jon Skeet
+1  A: 

If you can't get a signed version of the third-party assembly and need this to get working, a way out would be to load the dll dynamically at run-time.

0xA3
Thanks - this worked :) Ugly but my only option at this point.
Vixen