Reflector Add-In Resurrection

You must have been hiding under a rock if you haven't heard about the new version of Lutz Roeder's .NET Reflector by now. With its support for generics, loading any version of mscorlib (including 2.0 and Mono) and the refreshing of assemblies you're in for a treat! This means all of the frustrations faced by my original Reflector Add-In are gone.

Lutz has been kind enough to give me all of the code and hooks needed to make a maintainable version of the add-in. This time round I won't be faced with breakages on every new revision of Reflector (they were coming every few days at one point). Even obfuscation turned out to be a good thing as it removed the temptation to dip into internal stuff that was likely to change.

Here is a link to the new add-in and release notes...

Name: 
Reflector.VisualStudio
Feed: http://weblogs.asp.net/nunitaddin/category/5004.aspx
Description: An add-in for Visual Studio that hosts .NET Reflector and synchronizes the selected CodeElement.
Unzip files into the same directory as Reflector.exe. The resulting directory structure should look like this...
Reflector.exe Reflector.VisualStudio.exe Reflector.VisualStudio.exe.config VisualStudio\MutantDesign.ManagedAddIns.dll VisualStudio\MutantDesign.ManagedAddIns.Services.dll
From the command line execute "Reflector.VisualStudio.exe /install". To remove the add-in execute "Reflector.VisualStudio.exe /uninstall".

To launch .NET Reflector in a tool window select 'Addins/Reflector'. Once started you can 'Synchronize Reflector' (just like Synchronize Class View) on any code element.  This includes methods, fields, classes etc.  Let me know if you find any code elements that don't work in C# projects (support should be pretty comprehensive).  I haven't tested it at all with VB so I'd be interested to know how you get on there.

There is a known issue if you close Visual Studio before closing Reflector.  Your tool window positions won't be saved (which is a bit annoying).  There should be a fix for this later on in the week.  Bug reports are welcome, please comment here.

15 Comments

  • I just installed the addin and it shows up in an addin menu, I can right click and see reflector menus but Reflector never shows up.



    Using C#.

  • Yeah!! Really cool.

  • Folder structure should be:-

    Reflector.exe

    Reflector.VisualStudio.exe

    Reflector.VisualStudio.exe.config

    VisualStudio\MutantDesign.ManagedAddIns.dll

    VisualStudio\MutantDesign.ManagedAddIns.Services.dll



    Like Paul, installation of the add-in works for me, but when you click, Reflector never shows up.



  • Reflector 4.0 is a must-have, because it finally fixes a decompilation bug that has probably been in Reflector since inception. I.e. method System.IO.Path.CheckInvalidPathChars is finally reverse-compiled properly into C#. Previously it got the operator wrong, reporting == when it should be !=



    It would be nice to have a list of known decompilation bugs (hopefully there are none left). With such bugs lurking, you can't rely on a tool like Reflector to be a CLR source-code browser.

  • No luck in VB .NET here either.

  • More pain than gain. Doesn't work.

    And after installation, you can't use reflector anymore from the explorer window.

  • is there any way to keep it in sync while Debugging?

  • Hi Yosi,



    Not yet. I have some pretty decent unit tests created for the sync with C# code functionality (I'll need to do the same from VB and J#). I'm thinking about how to do the same thing with stack frame sync. It should be possible - just a little more tricky.



    There is another possability. One of the reflector add-ins will output the source for a whole assembly. If you could output PDB files at the same time you could step through decompiled code. This would be pretty sweet. :)



    Stay tuned, Jamie.

  • The ultimate VS integration would be to show decompiled rather than disassembled code when you double-click on a line-item in the call stack while debugging. As you know, VS jumps to the disassembly for the code - even core framework code - but decompiled code would kick ass!



    Do you think it is technically possible?

  • The link to the zip file is broken. Is there somewhere else I can download it from?

  • The add-in URL yields a 404 error. Any idea where I can download this add-in?

  • Over worked and not enough fun, I think I'll take the advised that was given to me about Charlisangels exotic
    resorts in the Dominican Republic.

  • creature consciousness rosenthal [url=http://www.micapullo.info/rosenthal33.html]creature consciousness rosenthal[/url] creature consciousness rosenthal http://www.micapullo.info/rosenthal33.html,jada hayworth [url=http://www.morewuz.info/jada20.html]jada hayworth[/url] jada hayworth http://www.morewuz.info/jada20.html,ed rosenthal super bud [url=http://www.micapullo.info/rosenthal33.html]ed rosenthal super bud[/url] ed rosenthal super bud http://www.micapullo.info/rosenthal33.html,old rosenthal china [url=http://www.micapullo.info/rosenthal33.html]old rosenthal china[/url] old rosenthal china http://www.micapullo.info/rosenthal33.html,bob white ufo proof positiveo hare ufo freehold township n j [url=http://www.glandered.info/freehold81.html]bob white ufo proof positiveo hare ufo freehold township n j[/url] bob white ufo proof positiveo hare ufo freehold township n j http://www.glandered.info/freehold81.html,

  • 124844.. Very nice :)

  • It is not my first time to go to see this site, i am visiting this website dailly and obtain
    good information from here all the time.

Comments have been disabled for this content.