繁体   English   中英

如何使用Mono.Cecil获取所有程序集引用?

[英]How to get all assembly references using Mono.Cecil?

我正在使用Mono.Cecil检查我构建的可移植类库。 我想知道在读取DLL之后如何获取所有引用的程序集,就像ILSpy那样。 有人可以帮忙吗? 这是我到目前为止的代码:

var module = ModuleDefinition.ReadModule(assemblyPath);

// No `References` or `GetReferences()` property on the
// resulting object, so I'm confused about what to do here

没关系,我是盲人。 您可以通过AssemblyReferences属性执行此操作:

var references = module.AssemblyReferences;

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM