When generating IL using DynamicMethod it's possible to call methods and access fields that would be otherwise un-accessible if you provide 'true' for the restrictedSkipVisibility parameter in the DynamicMethod constructor
I would prefer to emit dynamic IL into a dynamic assembly instead so I can save the generated IL into an assembly at build time. If I use this method I have to use a MethodBuilder instead of a DynamicMethod. However I need to be able to skip visibility checks so I don't get MethodAccessException's when I run my dynamic code. Is there a way to do this and if so how?