3

We have a customer who have two .NET assemblies, A and B:

  • Assembly A references assembly B.
  • Assembly A is unsigned, not obfuscated, no source code is available.
  • Assembly B is signed, not obfuscated, there is source code available.

I want to modify assembly A and change the manifest so that instead of referencing a signed version of B, it references an unsigned version.

I know it's possible using ILDASM to dump the IL, edit the references then recreate using ILASM, but is there a better way?

Kev
  • 118,037
  • 53
  • 300
  • 385
  • 2
    While you are looking to avoid decompile/recompile I have a post I wrote up a few months ago for this topic. http://www.hackersbasement.com/csharp/post/2009/09/16/Strong-Name-Unsigned-Assemblies.aspx – Matthew Whited Mar 30 '10 at 16:23
  • I have looked at writing a tool for this ... but the number of times I have needed to do it was once and the pain in the butt for the parser to automatically edit the IL could be a pain. – Matthew Whited Mar 30 '10 at 16:28
  • @Matthew - yeah this is a one off, but wondered if someone had built a something nice with a UI. – Kev Mar 30 '10 at 17:35
  • That would be really nice. This is probably one of those deep, dark edge cases that everyone tries to avoid :o) – Matthew Whited Mar 30 '10 at 17:48
  • I think the Reflexil add-in for Reflector can do this. http://reflectoraddins.codeplex.com/Wikipage – Hans Passant Mar 30 '10 at 17:50

1 Answers1

1

It's seems that decompiling with ILDASM, editing the resulting IL and recompiling with ILASM was the path of least resistance.

Kev
  • 118,037
  • 53
  • 300
  • 385