I think I'm following the right steps to decompile and debug a 3rd party dll, but when I start debugging I get an error message saying something like:
"ThirdParty.dll" was not the one Reflector expected.
...and it goes on to say that the loaded dll is from the GAC and that the expected one is in the 'Debug Signatures' directory. But, the dll in my project is the one in the 'Debug Signatures' directory. Any ideas?
mhatkinson
0

Comments

1 comment

  • Alex D
    Hi,
    The version of the assembly in the GAC should have a different public key token to the regenerated one in your Debug Signatures directory. That's how it should know to load the debug signatures version.

    Could you open your compiled assembly in reflector, and check the public key token of it's reference to the third party dll?

    If it's the original still, then somehow Visual Studio isn't compiling against the right one. This sometimes happens if the "Specific Version" option on the project reference is set to false. There might be other times that VS will do it, but I haven't seen them.

    If the public key token is the one of the regenerated dll, either something very strange has happened to your CLR which causes it to not use strong names correctly, or reflector's diagnostics have made some mistake (in which case, debugging should work).

    Let me know whether you find any of those work. Cheers,
    Alex D
    0

Add comment

Please sign in to leave a comment.