views:

63

answers:

2

When looking at the System.Data.Entity.dll for .NET 4.0, no methods are being decompiled. I only see the method stubs. I tried re-installing reflector but it still didn't work. I am able to decompile other .NET assemblies just fine.

A: 

Reflector does not decompile every assembly. It will not decompile assemblies which have been obfuscated in certain ways, nor portions of mixed mode assemblies (which contain native code).

Reed Copsey
Would it be correct to say that nothing however can stand in the way of `ildasm` ?
AakashM
@AakashM: Native portions of mixed mode assemblies don't work in ildasm ;)
Reed Copsey
Out of curiosity why would 'System.Data.Entity' be obfuscated though (how is it any different from any other .NET asm?)? When I view the IL, I still don't see *anything* (except the method stub)...
TheCloudlessSky
@AakashM: And well obfuscated code, though still readable post-ildasm, can be quite a pain in the rear to decipher....
Reed Copsey
@TheCloudlessSky: The BCL has quite a few portions that are obfuscated or mixed-mode. I suspect it may be mixed-mode (I haven't checked, though...)
Reed Copsey
@Reed: This just kinda stupid IMO, not obfuscate the majority of the .NET framework but then the *one* asm that I am curious about is obfuscated...
TheCloudlessSky
@TheCloudlessSky: Yeah, well, it's up to MS what they do.. I've found their choices of what to obfuscate strange in the past, myself.
Reed Copsey
@Reed - Even though what you posted is still relevant, I've changed the accepted answer to @Will because following his instructions did the trick. Cheers!
TheCloudlessSky
+3  A: 

I think your issue is that you've pointed Reflector at the metadata-only version of the assembly.

A number of assemblies are installed for use by VS 2010 that contain only the metadata, not the method's IL, of the original assembly. They did this for performance reasons and for multitargeting support.

If you check, you'll probably see that the assemblies you're looking at are under the "Reference Assemblies" directory in ProgramFiles. If you point to the same assemblies under windows\microsoft.net\framework... you'll see Reflector can disassemble this and all other BCL assemblies.

Will
@Will - You're *spot on* with this. I've changed yours as the accepted answer.
TheCloudlessSky