Scott Hanselman

Reflector Addins and PowerShell Language Support for Reflector

May 14, '07 Comments [10] Posted in PowerShell | Tools
Sponsored By

Hopefully if you've been coding .NET for a while, someone has shown you Reflector, Lutz Roeder's .NET Object Browser and you have basked in its glory.

Surprisingly (to me at least) not everyone knows about Reflector's plugin model. There is a vibrant and active community of plugin writers out there, and you won't realize the full power of Reflector until you download some of these are start messing around. Seriously, if you thought that Reflector was useful today, just wait until you've tried some of these add-ins.

PowerShell Language Add-In

The one I've been messing with for the last few weeks is the PowerShell Language Add-in. Reflector can "decompile" (not the correct word) the IL within an assembly and show you the "intent" of that IL in any number of languages like C#, VB, Delphi, etc. Daniel "kzu" Cazzulino has created a PowerShell Language Add-in that, for the most part, shows you what the code would look like in PowerShell.

Now of course, it's important to note a few things. PowerShell is not (yet) a language that you can use to author .NET assemblies with. It is, however, an incredibly powerful scripting and automation environment. Sometimes the Powershell language (it is a language, by the way, with a formal grammar - here's a link (PDF)) can be a little confusing to learn, so the PowerShell Language Add-in is a really cool way to learn more about PowerShell within an environment you're already comfortable in.

Reflector Add-Ins

Here's a reformatted snapshot of what's currently available.

CodeMetrics.png
CodeMetrics: Analyses .NET assemblies and shows design quality metrics. Download
Review.png
Review: Allows editing and managing annotations during code reviews. Download
Diff.png
Diff: This add-in shows differences between two versions of the same assembly. Download
FileDisassembler.png
FileDisassembler: This add-in can be used to dump the disassembler output to files for any Reflector supported language.
SQL2005Browser.png
SQL2005Browser: This add-in allows to browse .NET assemblies stored in SQL Server 2005 databases.
FileGenerator.png
FileGenerator: This add-in can be used to dump the disassembler output to files for any Reflector supported language.
Deblector.png
Deblector: This add-in allows to debug processes from within Reflector.
Doubler.png
Doubler: A code generator for unit tests, stubs and wrappers.
Graph.png
Graph: This add-in draws assembly dependency graphs and IL graphs. Please read the install instructions here.
DependencyStructureMatrix.png
DependencyStructureMatrix: Allows you to create and browser dependency structure matrices.
CodeSearch.png
CodeSearch: This add-in allows searching for strings and regular expressions in disassembled code. Download
SequenceViz.png
SequenceViz: This add-in draws sequence diagrams.
PowerShellLanguage.png
PowerShellLanguage: Renders output as Windows PowerShell script.
DelphiLanguage.png
DelphiLanguage: The Delphi view that is used inside .NET Reflector provided as a language add-in.
CppCliLanguage.png
CppCliLanguage: This add-in extends Reflector with a C++/CLI language rendering module.
Hawkeye.png
Hawkeye: A tool that allows you to debug the UI tree of Windows Forms applications.
ClassView.png
ClassView: Shows class definitions as plain text with color coding.

CodeModelViewer.png
CodeModelViewer: This add-in shows the underlying code model objects for selected items.

Diff.png
Diff
: This add-in shows differences between two versions of the same assembly. Download
ComLoader.png
ComLoader: Lists COM components for browsing and converts them into managed interop assemblies. Download
TestDriven.png
TestDriven.net: This Visual Studio add-in can navigate to any code element inside Reflector with a single click.
BizTalkDisassembler.png
BizTalkDisassembler: Allows you to list all BizTalk artifacts contained in an assembly and extract them. Download
ComLoader.png
ComLoader: Lists COM components for browsing and converts them into managed interop assemblies. Download
AutoDiagrammer.png
AutoDiagrammer: This add-in draws class diagrams.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb
Monday, 14 May 2007 20:33:37 UTC
Nice! I am always encouraging people to use a lot of these addi-ins. Thanks for letting me/us know about the POwerShell add-in.
Monday, 14 May 2007 21:20:59 UTC
There are many Impressive plugins but many take an impressive amount of time to get working.
Monday, 14 May 2007 21:22:20 UTC
Examples? There were a few that had some prereqs, but I didn't have much trouble.
Monday, 14 May 2007 21:22:51 UTC
FYI, I also put out the Running Assembly add-in. It's not hosted on Codeplex though.

http://weblogs.asp.net/kdente/articles/438539.aspx
Tuesday, 15 May 2007 00:29:49 UTC
You left out the BAML Viewer which allows you to decompile BAML to XAML and can then be saved to file.

http://www.codeplex.com/reflectoraddins/Wiki/View.aspx?title=BamlViewer&referringTitle=Home
Glenn
Tuesday, 15 May 2007 14:06:52 UTC
I have never had any problems getting any of them running either
Tuesday, 15 May 2007 15:08:59 UTC
Through an unrelated set of circumstances I just discovered the shiny goodness that is Reflector. Anyone have "favorite" plugins? Mine so far are Graph and CodeMetrics.
Kurtis Miller
Thursday, 17 May 2007 16:53:27 UTC
wow - I new about Reflector but had no idea about the plug-ins ... thanks Scott!
Thursday, 17 May 2007 22:04:09 UTC
i tried to unlock my husbands computer and messed it up and now i am trying to reset the computer to may 16, 2007 and i need alot of help
billie
Friday, 18 May 2007 13:07:11 UTC
Uhm, you may want to run a DIFF on your columns above... Too bad there's not a de-duplicator add-in.
Anonymous Coward
Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.