Reflector不显示类实现
我正在尝试反编译一个库,但是当我单击类名或方法名时,实现代码为空。
例如:
public bool MethodOne(string str)
{
// nothing
}
它可能是什么?
I'm trying to decompile a library but when I click on a class name or a method name, the implementation code is empty.
For example:
public bool MethodOne(string str)
{
// nothing
}
What could it be?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您可能试图反映 Visual Studio 使用的参考程序集来提供多目标支持。这些程序集仅包含元数据,没有任何实际实现。
如果是这种情况,您可以使用 VSCommands 2010 扩展 获取实际程序集的实现路径。
程序集详细信息 http://vscommands.com/wp-content/uploads/ 2011/04/image12.png
You may be trying to reflect reference assemblies used by Visual Studio to provide multi-targeting support. These assemblies are metadata-only and don't have any actual implementation.
If that is the case than you can use VSCommands 2010 extension to get path to the actual assembly with implementation.
assembly details http://vscommands.com/wp-content/uploads/2011/04/image12.png
您可能打开了其中没有代码的参考程序集或 PIA。
方法体实际上可以是空的。
(还有其他的可能性吗?)
You might have opened a Reference Assembly or a PIA that doesn't have code in it.
The method body could actually be empty.
(Other possibilities?)
我在 VSSDK 程序集中也看到过这种情况。
它可能是一个公共提供的接口库,但实际的实现“隐藏”在某个地方。 (也许在 GAC 中?)
基本思路是:
我建议您在调试器中放置一个断点,然后查看实际加载的程序集是什么以及它是从哪里加载的。
I have seen this with the VSSDK assemblies too.
It could be a public provided interface library, but the actual implementation is 'hidden' somewhere. (Maybe in the GAC?)
The basic train of thought is:
I suggest you place a breakpoint in the debugger, and see what is the actual loaded assembly and where it is loaded from.
它使用什么版本的 .Net 框架? .net 4.0 程序集似乎存在一些问题,会发生这种情况......或者论坛中的一些人是这么说的:Reflector Forum
有IL吗?
What version of the .Net framwork is it using? There seems to be some issue with .net 4.0 assemblies where this happens ... or that is what some people in the forums are saying: Reflector Forum
Is there any IL?