【问题标题】:System.TypeLoadException Method 'GetX' in type 'MyNamespace.MyType' from assembly 'myAssembly' does not have an implementation程序集“myAssembly”中的“MyNamespace.MyType”类型中的 System.TypeLoadException 方法“GetX”没有实现
【发布时间】:2012-10-21 09:27:10
【问题描述】:

每当我在动态加载的程序集上调用 assembly.GetExportedTypes() 方法时,都会收到 System.TypeLoadException。我已经完成了我的作业,并查看了所有的融合日志,但没有任何意义。我什至打开了目标程序集/DLL 文件并找到了 GetX() 方法实现,所以我不确定到底发生了什么。并且它不会缓存在 GAC 中,也不会像使用探测应用配置元素一样加载旧版本。

有什么想法吗?

【问题讨论】:

标签: c# .net exception reflection .net-assembly


【解决方案1】:

问题原来是将同一个程序集加载到多个应用程序域中,这会导致各种运行时错误,更多信息here

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-07-17
    • 1970-01-01
    • 2010-11-30
    • 1970-01-01
    • 2011-08-24
    • 2017-01-15
    • 1970-01-01
    相关资源
    最近更新 更多