Categories
Software Development Technology

Telerik JustDecompile Awesomeness

If you've ever had the (dis?)pleasure of working with me, you know that I am a pretty big fan of the products of Telerik. JustCode and JustDecompile are two of my daily drivers (I didn't realize until JustNow that the title of this blog, JustKarp, JustHappens to match the marketing names of Telerik's productivity tools, I promise that this is JustACoincidence; sorry, I'll stop now). Anyways... I was adding JustDecompile to my External Tools list in Visual Studio today and discovered a second executable in JustDecompile's program directory: JustDecompileCmd.exe (located in %ProgramFiles(x86)%\Telerik\JustDecompile\Libraries). A little digging (OK, I just ran it) revealed that this is a command line version of the program - cool. It turns out that this feature is listed on the JustDecompile Features list on Telerik's website, but it really is downplayed (BTW, this currently only supports C#).

So, I ran the program again, this time pointing it at a .NET assembly (I chose a handy copy of the log4net library) and it spit out 215 files into the folder I specified (C:\log4net), all of which were organized into namespace folders, including a .csproj file that you can, of course, JustOpen (sorry, I can't help myself sometimes) in Visual Studio. The command looked like this:

JustDecompileCmd /target:"C:\log4net.dll" /out:"C:\log4net"

 

Pretty straightforward and Pure. Awesome. Great work Telerik!

P.S.
Here's what I did to add JustDecompile to the Visual Studio External Tools list

Go to: Tools > External Tools... > Add
Title: (Whatever you want)
Command: C:\Program Files (x86)\Telerik\JustDecompile\Libraries\JustDecompile.exe (of course, make this match your environment)
Arguments: $(ItemPath)
Initial directory: $(ItemDir)

Specifying $(ItemPath) & $(ItemDir) will start JustDecompile and attempt to decompile which ever file is highlighted in the Solution Explorer. I did this so I can just hit Show All Files and decompile any assembly in the project's bin.

In the spirit of full disclosure, while I do pay for Telerik subscriptions, as the leader of the Oklahoma City Developer's Group, I have also received complementary licenses of Telerik products as a part of their ongoing support of the .NET development community. This blog post was completely unsolicited by Telerik.

By Justin

I'm a software developer, consultant, and the founder of Karpilo Digital, a web and software services company as well as the owner of this blog.

Leave a Reply

Your email address will not be published. Required fields are marked *