Here is the situation. I have DLLs A and B. A.dll reference and uses code in B.dll. B.dLL isn't doing what it is supposed to, so I'm trying to add some debug statements to it.
I Decompile B.dll using ilSpy and add the code I want, compile a new B.dll, delete the old one and drop in my new one.
Now A.DLL fails with This error.
System.IO.FileLoadException: Could not load file or assembly 'B, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b089z623fagfd396' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'B, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b089z623fagfd393'
Since I don't have the source code or private key, I don't think it is possible for me to get my DLL's public key to match the old one. Since that key doesn't match, the reference fails. Is this by design? Is the structure built specifically to prevent me from doing what i'm trying to do. Essentially, I guess I am hacking an application which I don't have source for.
Is there anyway i could do this?
I guess I could just Decompile and rebuild A.dll as well, but there are actually around 200 DLLs all referencing each other.