使用Assembly.LoadFrom(file.exe)加载程序集时出现C#错误

时间:2013-11-07 18:18:11

标签: c#

尝试使用

加载程序集时,我尝试从exe文件中访问方法列表
Assembly asm = Assembly.LoadFrom(file.exe);

我收到的错误如下。我从调试窗口的本地部分复制了这些。希望有人可以帮助解决这个问题。

    DefinedTypes    Function evaluation timed out.  System.Collections.Generic.IEnumerable<System.Reflection.TypeInfo>

    EntryPoint  Function evaluation disabled because a previous function evaluation timed out. You must continue execution to reenable function evaluation. System.Reflection.MethodInfo

    EscapedCodeBase Function evaluation disabled because a previous function evaluation timed out. You must continue execution to reenable function evaluation. string

    Evidence    Function evaluation disabled because a previous function evaluation timed out. You must continue execution to reenable function evaluation. System.Security.Policy.Evidence

    ExportedTypes   Function evaluation disabled because a previous function evaluation timed out. You must continue execution to reenable function evaluation. System.Collections.Generic.IEnumerable<System.Type>

    FullName    Function evaluation disabled because a previous function evaluation timed out. You must continue execution to reenable function evaluation. string

    GlobalAssemblyCache Function evaluation disabled because a previous function evaluation timed out. You must continue execution to reenable function evaluation. bool

    HostContext Function evaluation disabled because a previous function evaluation timed out. You must continue execution to reenable function evaluation. long

    ImageRuntimeVersion Function evaluation disabled because a previous function evaluation timed out. You must continue execution to reenable function evaluation.
string

    IsDynamic   Function evaluation disabled because a previous function evaluation timed out. You must continue execution to reenable function evaluation. bool

    IsFullyTrusted  Function evaluation disabled because a previous function evaluation timed out. You must continue execution to reenable function evaluation. bool

    Location
Function evaluation disabled because a previous function evaluation timed out. You must continue execution to reenable function evaluation. string

    ManifestModule  Function evaluation disabled because a previous function evaluation timed out. You must continue execution to reenable function evaluation. System.Reflection.Module

    Modules Function evaluation disabled because a previous function evaluation timed out. You must continue execution to reenable function evaluation. System.Collections.Generic.IEnumerable<System.Reflection.Module>

    PermissionSet   Function evaluation disabled because a previous function evaluation timed out. You must continue execution to reenable function evaluation. System.Security.PermissionSet

    ReflectionOnly  Function evaluation disabled because a previous function evaluation timed out. You must continue execution to reenable function evaluation. bool



    SecurityRuleSet Function evaluation disabled because a previous function evaluation timed out. You must continue execution to reenable function evaluation. System.Security.SecurityRuleSet

1 个答案:

答案 0 :(得分:0)

您可能缺少某些依赖项,但我们无法确定,因为您发布的例外情况,几乎没有提供任何信息。

他们说,您应该调试调试器以获取正确的异常信息。

也许你可以再试一次,并发布一些有用的可读例外。