如何从.dll读取完整的源代码? [英] How is it posible to read the complete source code from .dll?

查看:66
本文介绍了如何从.dll读取完整的源代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我们的团队开发了该工具,该工具可用于查找项目中Changed方法的引用. 1,我们使用反射来读取命名空间,类名和方法名的e.t.c. 2.我们开始在cs文件中搜索方法"body",并存储在列表中. 3.我们采用了每种方法来查找参考文献,但是我看到了反射器工具,该工具使用.dll读取完整的源代码.怎么会发生?有什么办法可以从反射中读取源代码?请对此提供帮助.预先感谢

Hi everyone,Our team has developed the Tool which is used to find the reference''s of a Changed method in a Project. 1.We used reflection to read the Namespace,Class Name and Method name''s e.t.c. 2.We started to search the method''sbody in cs file''s and we stored in a List. 3.We have taken each and every method for finding the Reference''s But i have seen the reflector tool which reads the complete source code using .dll''s . How to would happen? Is there any way to read the source code from reflection?Please help me regarding this Thanks in advance

推荐答案

您可以尝试使用Reflector反编译Reflector,然后研究代码它将代码提取并以某种方式在您自己的应用程序中实现.但是,请尝试使其足够不同,否则可能会因侵犯版权而被起诉.
You may try to decompile Reflector using Reflector, then study the code which does the code extraction and implement it somehow in your own application. Try to make it different enough though, or you may be sued for copyright infringement.


如果您只想比较差异,则可以在新旧代码上运行ildasm.exe,然后解析生成的IL源并进行比较.
If you merely want to compare differences, you could run ildasm.exe on the old and new code, and parse the generated IL source and do a comparison that way.


这篇关于如何从.dll读取完整的源代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆