このコードを使用すると、プログラムが応答しなくなります。
Assembly assembly = Assembly.LoadFrom(@"C:\test\test.exe");
Type[] typesInAssembly = assembly.GetTypes();
デバッグ モードでは、このコードは 2 行目の実行時に応答を停止します。
test.exe
空の WindowsformApplication.exeに変更したところ、動作しました。で動作しない理由がわかりませんtest.exe
。ブレークポイントを配置し、Locals セクションのデバッグで Locals をチェックしたところ、いくつかのエラー アイコンが表示され、以下に貼り付けました。誰かがこれについて私を助けてくれることを願っています。
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