Red Gate forums :: View topic - Certain .net 4.0 assemblies can not disassemble with source
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
.Net Reflector 6.x and .NET Reflector 6.x Pro
.Net Reflector 6.x and .NET Reflector 6.x Pro forum

Certain .net 4.0 assemblies can not disassemble with source

Search in .Net Reflector 6.x and .NET Reflector 6.x Pro forum
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Jump to:  
Author Message
japple



Joined: 08 Dec 2010
Posts: 3

PostPosted: Wed Dec 08, 2010 3:31 pm    Post subject: Certain .net 4.0 assemblies can not disassemble with source Reply with quote

I am running version 6.5.0.135, and I am unable to view method source code for certain Microsoft assemblies on dot net 4.0.

An example would be the following:
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.ServiceModel.Discovery.dll

If you find the discoveryclient class, you will see method stubs but no source code within the methods.

I have no add-ins loaded and have fully reinstalled reflector. I am able to see method source code in other dot net 4.0 assemblies. I am wondering if some of the new microsoft code has been obfuscated or if there is some bug. Either way, as long as I know the answer, that would be helpful.

Thank you!
Back to top
View user's profile Send private message
Clive Tong



Joined: 04 Dec 2008
Posts: 283

PostPosted: Wed Dec 08, 2010 5:00 pm    Post subject: Reply with quote

You are looking at a "Reference Assembly". These contain the metadata but not the IL, hence no code is displayed for the methods.

You'll need to point Reflector at the real assembly to get the method source.
Back to top
View user's profile Send private message
japple



Joined: 08 Dec 2010
Posts: 3

PostPosted: Wed Dec 08, 2010 5:24 pm    Post subject: Reply with quote

I had hastily copied the reference path from VS 2010 instead of the real directory. Once I hit the correct path, all is well again.

I have to remember that the "reference assemblies" directory is really just for design time in the IDE.

Thank you.
Back to top
View user's profile Send private message
Clive Tong



Joined: 04 Dec 2008
Posts: 283

PostPosted: Wed Dec 08, 2010 5:57 pm    Post subject: Reply with quote

File/OpenCache is quite useful in this regard as it lists the files in the GAC instead of other places like the "Reference Assemblies".
Back to top
View user's profile Send private message
japple



Joined: 08 Dec 2010
Posts: 3

PostPosted: Wed Dec 08, 2010 6:02 pm    Post subject: Reply with quote

You're right. Open cache is really what I should be using as a matter of practice.

I really enjoy reflector, as most dot net developers do, and I sometimes get too accustomed to habit.

Thanks for your tips and reminders!!
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies. All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group