.NET Reflector 9

Exporting source code

If you‘ve lost the source code for one of your assemblies and you want to recreate the files, you can do this by using .NET Reflector’s Export source code option.

  1. Open the .NET Reflector desktop application.
  2. On the Tools menu, under Options, then under Disassembler, make sure that language and optimization are set as needed.
  3. Load your assembly into the Reflector object browser.
  4. Right-click the assembly and choose Export source code.

    Make sure you right-click the assembly node. If you're on a namespace or class node, the option isn't available.

  5. Click Start. 
    The C# or VB source files and .csproj / .vbproj file are created for the project in the specified output directory. You can open the project in Visual Studio, fix any errors and changes the code as needed, and rebuild the project

Exported source code isn't perfect. There may be errors in the exported code that you need to fix manually.


Didn't find what you were looking for?