I'm modifying an assembly using Mono.Cecil
, and I want to check it for validity (whether the result will run at all). I'm trying to use PEVerify
, but I'm having a problem.
It was designed for ensuring code is verifiable, so it just says ERROR
whether the error means the IL is completely invalid and will not execute, or whether it's a verifiability issue that would be ignored in full trust. Here are some examples:
- Using pointers and the like.
- Not setting
.locals init
when the method has locals. - Calling
.ctor
from a non-constructor method.
Issues that make the IL fail to run include:
- Member isn't accessible from the location it is used in.
- Member doesn't exist.
Is there a way to make it give me some indication of the severity of the issue? If not, is there another tool that can do this?