开发者

C# DynamicMethod Could not load type

开发者 https://www.devze.com 2023-02-28 03:34 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号