I disassembled a C# program with ildasm and modified the il code to my needs but now when i try to assemble it back into an exe i get these errors:

    Cannot compile native/unmanaged method
    Local (embedded native) PInvoke method, the resulting PE file is unusable

I have generated a snk file and tried to use that with ilasm but i still get the same errors.