/ Tools

DotPeek From JetBrains Saved My Bacon!

So I have been working on the 2nd version of an internal application that I hope will help my team and others in the agency simplify the way we retrieve data from various data sources. There has been lots of chatter on how to make two different back end technologies talk to each other, for example ColdFusion and .NET. In my humble opinion, I think web services is the obvious answer, but am sure there may be some who disagree or know of a better process or API, but I am sticking with HTTP web services =).

Am a Total Noob!

So while working on this application I forgot to check in hours worth of work into GIT source control, as well as committing any work locally, and playing around with Visual Studio Code I did the stupidest thing ever...I clicked on "Clean All"...Where is my F*&^& work!?!?! Oh crap...

Panic, Despair, and DOOM!

NO, NO NO!! I immediately rushed into Stackoverflow desperately trying to find a sliver of hope. Where is Phil Haack when you need him? Then, I found the post that will forever leave a scar on my soul...the post destroyed all hope of retrieving my work. How in the world am I going to retrieve 8 hours worth of work!?!?!

DotPeek from JetBrains to the Rescue!

I was running out of options and in my mind I was already formulating a story of what to tell my boss. How would I deliver the news...it was not good. But after about an hour Googling with Bing I found a great tool called dotPeek from Jetbrains. It is a tool that allows you to target compiled assemblies and decompiles them to allow for the extraction of your source code. Best of all...it's free!! It just so happen that I had actually published to staging server all the recent work I had lost on my local machine, only problem was it was compiled, but this tool would allow me to recover my code by decompiling the files.

How to Install & Use

I am going to list out step by step instructions on where to download and how to use this awesome tool.

Step 1. Go to site and Download
Step 2. Install the tool.

Step 3. After successful installation, find the tool and open it.

Step 4. Locate where your compiled applications is located, and copy content to a known location on your local machine. I placed my copy on my desktop.
Step 5. From DotPeek, go to File, Explore Folder, locate files and once you have found the folder click on "Select Folder".

Step 6. After choosing the folder you will notice that DotPeek places the path on the left side Assemply Explorer, expand the folder and commence your search by looking for the name of the project, in my example for demo purposes the project name is called "WebApplication3". I want to peek at the C# code inside of a controller class called "DotnetDemoController".

Step 7. Double click on the "DotnetDemoController" opens the main content to right of the application showing all the C# and source code.


Peace and harmony was once again restored, and I once again felt a balance in the force. Thank you JetBrains!