.NET
Alternatives to Reflector: ILSpy, dotPeek, JustDecompile, Fazit
A long time ago, I wrote about the Reflector debacle and the URLs how it used to update. Since then Reflector 6.8.2.5 came out. No newer free versions will be released, and RedGate randomized parts of the URLs to make it harder to upgrade if you do not have version 6.5.0.135 around (if you really want you can go around that too).
So I’ve been using some alternatives for a while: ILSpy by SharpDevelop (open source), dotPeek by JetBrains and JustDecompile by Telerik (both closed source).
There are more (monoflector, Kaliro App Explorer, Dotnet IL Editor, Dis#, StackOverflow threads and various sites describing more) but I discuss the ones I used.
ILSpy
Installation means unzipping the download and running the EXE in it. Plain simple.
After starting ILSpy, you see that the GUI mimics Reflector. That raises expectations. Not sure if that is good (:
F3 works similar to Reflector, but you cannot search for System.String (bad), you have to search for “String” or “string” which results in “System.String” to be the topmost entry. Good: as now pressing Down and Enter will get you to System.String.
Disassembly is like Reflector, however, it collapses all code regions, and there seems no way to unfold those in one go. Not good.
You cannot click on built in types like int and string to navigate to their framework counterparts like you can in Reflector. Not good.
Searching and clikcing is fast. No time lag.
The “Analyze” feature is like the “Find References” feature in Reflector. It is fast too. Good.
dotPeek
Installation means unzipping the download and running the EXE in it. Plain simple.
dotPeek is a lot slower than Reflector was.
Sorting assemblies by versions is strange: first you get 0.0.0.0, then 1.x.y.z, then 10.x.y.z, then 11.x.y.z, then 2.x.y.z. Apparantly nobody of the dotPeek team ever sorts by version.
The easiest way to load the .NET 4.0 framework from the GAC, is sort by version, search for System.* and select everything that has version 4.0.0.0. Not good.
F3 doesn’t work as a search for symbol shortcut (like it did in Reflector) but maps to Ctrl-F (find in current source code). To find symbols you need Ctrl-T, which takes forever to load a symbol list. Not good.
You cannot click on built in types like int and string to navigate to their framework counterparts like you can in Reflector. Not good.
JustDecompile
The installer tries to get you hooked to the non-free JustCode and JustTrace. I hate it when installers do that.
The GUI of the installer has the checkboxes scattered over the dialog, and has so little contrast in colors, that you need to look twice to see what is enabled and what not. Their install builders clearly need to use their install GUI more often.
You also need to provide all sorts of info in order to sign up for an account (firstname, lastname, company, email and country? luckily the IANA example domains example.com and example.org work fine for that). Too bad that Example didn’t work as country. The auto-completion made “El Salvador” out of it. Fine. Now Telerik has a new client Example Exampl working at Example with email Example@Example.org living in El Salvador. Good luch with that.
The installer then downloads a zillion megabytes (hey, what about providing an offline installer!) and takes minutes to install and display marketing material (which I couldn’t see because I switched away doing some useful work; at least this installer allows switching away from it, unlike many obnoxious installers that think they are the most important asset on your screen).
You can start it my pressing your Windows key, then typing JustDecompile (No spaces needed. Good!).
One good GUI aspect is that it allows you to load the .NET 4.0, 3.5, 2.0 or Silverlight framework assemblies each as a set.
The list for the 4.0 framework is way bigger than Reflector used to load, which is good as it always took me forever to get manually open those from the GAC in Reflector.
Searching for classes is a nightmare, as you can only type the classname, not the namespace. So searching for System.String (which works dandy in Reflector) results in “no results were found”. You have to search for “String”, then select from a huge list. Also, pressing Down then Enter doesn’t select the topmost entry in the searched list like Reflector did. Both points not good.
The GUI is slow. If you click on anything, it lags before displaying new information. Reflector is snappy. JusDecompile is not. It also doesn’t show a wait cursor when it lags, so you risk clicking on multiple things before realising that it was working in the background.
Decompiling works nice: syntax highlighted source code where you can click on any references and it will follow (with a lag) the reference.
Decompile only supports the Visual Basic, C# (default), and IL languages.
Like Reflector, you can click on built in types like int and string to navigate to their framework counterparts. Good.
“Finding usages” is similar to “Finding References” in Reflector. But it is slower, and doesn’t show the progress of the search which means you don’t know how long the search will take. It also doesn’t remember the search history that Reflector does.
You cannot dock the “Find Usages” or “Search” windows, which means they will partially obstruct the decompiled code view (unless you put those windows on a secondary monitors or make the main window smaller).
Fazit
More than a year after Redgate announced that Reflector would become commercial, the alternatives are, well basically not real alternatives.
I was hoping to use Reflector only when I’m lazy, and fall back on stuff that has settled in my premotor cortex.
That is not the case.
Reflector 6 (of which the majority basically is the work of one man: Lutz Roeder) still is far ahead of any similar things.
Reference: Alternatives to Reflector that I tried: ILSpy (from SharpDevelop), DotPeek (from JetBrains) and JustDecompile (from Telerik) – none of them cut it from our NCG partner Jeroen Pluimers at the The Wiert Corner blog.