I have a C# .NET DLL that I'm trying to patch. I chose .NET Reflector with the Reflexil plugin for the job (along with de4dot for deobfuscation). Reflector was able to very successfully show me the C# I wanted to see and I was able to patch the CIL assembly with Reflexil. When I tried to save the DLL as a new binary, Reflexil gave me a Signed Assembly dialog box, I chose to Remove Strong Name.
When I try to run the code that loads the assembly I get the error:
System.BadImageFormatException: Could not load file or assembly 'MyAssembly, Version=1.0, Culture=neutral, PublicKeyToken=somehash' or one of its dependencies. The module was expected to contain an assembly manifest.
How do I solve this problem?
Additionally, if I use peverify.exe on the patched DLL I get an error: File not found or has bad headers. This is leading me to believe there is something wrong with Reflexil's patching process?