Thursday, July 12, 2007

Decompiling .NET assemblies with Reflector

My HDD crashed a few weeks ago. I had back ups of mostly everything but not as recent as I should have. My Visual Source Safe database was backed up more than 3 months before the incident so I lost 3 months worth of changes to the code.

I have another (private) blog where I document changes I make to the multiple applications and components that make up the solutions I work in but it was impossible to recreate every change I made based on that.

I had backups of every build I made so I thought that if I could somehow decompile the code based on those build assemblies I would be able to replicate every little change in the code that had been lost with the HDD failure.

I started looking for a utility and found this:

  • MSIL Disassembler
  • Salamander .NET
  • Reflector
MSIL Disassembler is an intermediate language decompiler provided by Microsoft, which means that it decompiles to .NET's Intermediate Language. It is a pretty cool utility but it didn't help me solve my problem. I need to recompile to VB.NET.

Based on the screen shots available at Salamander .NET's website it seems like that tool could really help me, but the price is just way above my capacity: $1,099.00 USD!!!!

I was about to give up when I came across Lutz Roeder's .NET Reflector and it turned out to be an amazing utility that not only was free and did what I needed but it was also expandable via freely available add-ins.

There are plenty of documented experiences and tutorials on how to use .NET Reflector, here is one article demonstrating .NET Reflector virtues. Here is a screen shot of Reflector disassembling CSLA.DLL, which part of Rockford Lhotka's widely adopted CSLA. NET business objects framework.

Labels: ,

0 Comments:

Post a Comment

<< Home