Exporting source code
Published 16 November 2015
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.
- Open the .NET Reflector desktop application.
- On the Tools menu, under Options, then under Disassembler, make sure that language and optimization are set as needed.
- Load your assembly into the Reflector object browser.
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.
- 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.