I have been trying to debug our IL-rewriting profiler lately and came across some methods that failed. Either the caller throws TypeLoadExceptions or a "Common Language Runtime detected an invalid program." on stdout. I was wondering if there are any tools that can verify the modified IL (as well as the modified LocalVarSig) and tell me specifically what is wrong? I actually isolated the problematic methods, disassembled the target method IL, hand-modified the IL equivalent to our IL-rewriting profiler, re-assembled IL. I was able to successfully re-assemble the IL without any errors, which says to me perhaps the error lie else where.