Saturday, October 9, 2010

.NET Framework libraries only show structure but no code in Reflector

Last week I opened some .Net 4.0 assemblies in Reflector but instead of showing me the actual disassembled code, it showed me an empty implementation.

EmptyCodeReflector

I couldn’t understand why it wasn’t working  until I realized that I was trying to reflect reference assemblies  located under C:\Program Files\Reference Assemblies\Microsoft\Framework. These are metadata only files used by Visual Studio 2010 to support multi-targeting.

To fix the problem you need to load the real assemblies from c:\windows\microsoft.net\framework\v4.x.x\ instead.

FilledCodeReflector

No comments: