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.
- 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.
- Extract Reflector into a directory on your computer. I chose C:\Program Files\Reflector\ as my directory.
- Download the File Disassembler Add-In, which allows you to export the contents of the assembly into a Visual Studio project.
- Extract Reflector.FileDisassembler.dll from the zip and into to the same directory as your Reflector application.
- Open the Reflector application.
- Chose whichever version of .NET that you're currently using.
- Go to View > Add-Ins and click the Add... button.
- Double click Reflector.FileDisassembler.dll to selected it, then click Close.
- On Reflector's menu bar under Tools there's now an option called File Disassembler.
- 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.
- Click on the assembly's name once to select it.
- 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.
- 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.)
- Click the Generate button in the File Disassembler pane.
- Navigate to the directory that the DLL was decompiled to and enjoy!