Reflector doesn't show class implementation
I'm trying to decompile a library but when I cl开发者_Go百科ick 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?
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
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?)
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:
- Compile code against some 'stub' assembly
- When loaded in the application, the stub assembly is not resolved, but the actual one
I suggest you place a breakpoint in the debugger, and see what is the actual loaded assembly and where it is loaded from.
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?
精彩评论