I am trying to use DynamicMethod with a Type from another assembly. The assembly is loaded and I can use the Type perfectly fine. But when I try to use it in a DynamicMethod it throws a开发者_如何学Cn exception.
Could not load type 'TheClass' from assembly 'SomeModule, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
Turns out the Type was being compiled as internal instead of private.
精彩评论