Hi, 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?
Hi, 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?
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?)
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?
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.
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. read more here: http://mokosh.co.uk/post/2010/06/05/net-reflector-showing-empty-implementation/
If that is the case than you can use this plugin to get path to the actual assembly with implementation.