Decompile a .NET DLL into a Visual Studio project

by Justin 26. April 2008 09:34

As a professional developer you will eventually have to view or edit some code that you do not have the original source to. The original source could've been lost, accidently deleted, or never given to you when it should've been. When you are in one of these situations try the following.

  1. Download Reflector, which allows you to open an assembly (i.e. DLL file) and view its contents. However, by default you can not modify or export the contents of the DLL. You will need Add-Ins to do that.
  2. Extract Reflector into a directory on your computer. I chose C:\Program Files\Reflector\ as my directory.
  3. Download the File Disassembler Add-In, which allows you to export the contents of the assembly into a Visual Studio project.
  4. Extract Reflector.FileDisassembler.dll from the zip and into to the same directory as your Reflector application.
  5. Open the Reflector application.
  6. Chose whichever version of .NET that you're currently using.
  7. Go to View > Add-Ins and click the Add... button.
  8. Double click Reflector.FileDisassembler.dll to selected it, then click Close.
  9. On Reflector's menu bar under Tools there's now an option called File Disassembler.
  10. Use File > Open to open the name of the assembly that you want to decompile. It will load in the left pane after the Microsoft assemblies.
  11. Click on the assembly's name once to select it.
  12. Go to Tools > File Disassembler to open up the file disassembler's pane. Tip: Close any other pane's that may be obstructing your view.
  13. Make sure you're okay with the Output Directory and you have your language of choice selected in Reflector. (i.e. C#, Visual Basic, etc.)
  14. Click the Generate button in the File Disassembler pane.
  15. Navigate to the directory that the DLL was decompiled to and enjoy!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

Add comment


(Will show your Gravatar icon)  

  Country flag

biuquote
  • Comment
  • Preview
Loading



Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen