.NET Reflector Support: Can I edit assemblies I’ve opened in .NET Reflector?

Comments 0

Share to social media

Yes, you can. There are two possible approaches, both of which utilise add-ins to .NET Reflector.

The first, assuming that you’ve lost the source code, is to decompile back to source, edit the source code you need to change, and then recompile. If this is what you want to do, please refer to the information at:

http://www.simple-talk.com/community/blogs/bart/archive/2009/07/30/74199.aspx

Bear in mind that .NET Reflector’s decompilation support isn’t perfect-see http://www.simple-talk.com/community/blogs/bart/archive/2009/07/30/74203.aspx for more information-so you’ll probably have to do some, and possibly quite a lot of, spade work to get the code to recompile successfully.

The second, and possibly better, approach is to use Sebastien Lebreton’s Reflexil add-in, which you can find at:

http://sebastien.lebreton.free.fr/reflexil/

Reflexil supports direct editing of the IL, as well as injection of C# and VB code on the fly.

Load comments

About the author

Bart is a project manager for Red Gate Software Ltd. He's currently looking after the .NET Reflector Pro project. Previously he's working on ANTS Memory Profiler, ANTS Performance Profiler, SQL Prompt, and has touched the code for most of the Red Gate SQL developer tools... some of them still haven't recovered from the shock. He was born and grew up in Dorset, was educated in Nottingham and London, and likes music and real ale. His photo is extremely misleading.

Bart Read's contributions