Many of you were no doubt ticked when RedGate decided to stop providing Reflector as a free tool. Well, this post is not designed to harp on that or talk about how Redgate backtracked on that decision. Instead, let’s talk about a great replacement for it that is free and open source!
This great new tool is called ILSpy. It has a great feature that will let you output the disassembly code to actual C# files. This comes in super handy if you have a COM Interop assembly that you need to modify. I ran into this situation when working on a project leveraging the VirtualBox API.
The great thing is that it is supper easy to do. Once you open the interop assembly in ILSpy simply select the assembly node in the treeview and then on the File menu select Save Code… You will then be prompted to save a C# project file. Once you do that it will generate the project file and will create a .cs file per object in the assembly. And that is it!
Tags: .net, tips & tricks, com