Is there any IL editor to change the bytecode of an assembly?

Ignacio Soler Garcia picture Ignacio Soler Garcia · Apr 27, 2012 · Viewed 8.3k times · Source

I've detected some defects on legacy third party assemblies that we're using on our code decompilind them. I would like to fix them but as I don't have the source code I need to directly modify the bytecode. The changes are really simple (changing an AND for an OR and NOPing some lines).

Is there an editor to do this kind of things? Doing the work with an hex editor would be the last option, I would preffer to have a hint of what instructions I have around the cursor ...

Answer

Chris Xue picture Chris Xue · May 1, 2017

dnSpy, allows you to modify IL and C# code. See their screenshots.