I'm using Mono.Cecil to inspect a portable class library I've built. I'm wondering how to get all of the referenced assemblies after I read the DLL in, much like how ILSpy does it. Can anyone help? Here is the code I have so far:
var module = ModuleDefinition.ReadModule(assemblyPath);
// No `References` or `GetReferences()` property on the
// resulting object, so I'm confused about what to do here
Never mind, I'm blind. You can do this via the AssemblyReferences
property:
var references = module.AssemblyReferences;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.