Mono.Cecil vs System.Reflection 2
My friend Patrick, who’s leading the amazing NDepend effort wrote a great post comparing Cecil against the built-in System.Reflection:
Mono.Cecil vs System.Reflection
Thanks Patrick for the kind words!
Mono.Cecil 0.6
Yeah, time for a new release of Mono.Cecil.
New since 0.5:
- A lot of work to read obfuscated assemblies,
- Some precious optimizations,
- Improved the Mono.Cecil.Binary layer to read pure native PE binaries,
- Ability to annotate Cecil’s objects,
- Of course fixed a handful of bugs,
- Add a lot or helpers accessors to Cecil’s type, like IsPublic, IsVirtual, Is*,
- Preliminary support for debugging symbols (to be blogged about).
Where to download:
- Mono.Cecil 0.6 Sources (tar.gz)
- Mono.Cecil 0.6 Binary (tar.gz)
- Mono.Cecil 0.6 Sources (zip)
- Mono.Cecil 0.6 Binary (zip)
Thanks to all the folks that contributed patches to this release!
Beloved users, please upgrade.
Reflexil will rock your IL 2

Sébastien Lebreton, friend and Reflexil’s author published a nifty article on codeproject, which explains to the mass how to look clever in society, by inserting wisely chosen opcodes in your methods.
As a matter of fact, this article has first be written in French, and published on the TechHeadBrothers web site.
What’s really brilliant is that Reflexil uses Mono.Cecil to perform the mutations of the assemblies you’ll create.
Clarification
Eight days ago, I’ve blogged about an issue involving Cecil and ildasm. And the last security update to the .net framework.
After a few hours of investigation, I’ve managed to be able to reproduce the ildasm crash. It turns out that the security update is actually not involved in the issue. It’s just that I stumbled upon right after the security update, and that I had not experienced it before.
So, the ildasm crash happened when I was disassembling an assembly that I had just round-tripped. The issue is that in the same folder as the new assembly, there was the pdb file that was going along the assembly. So when Cecil re-writes the assembly, the methods identifiers are re-generated, and the pdb which keep track of them, becomes out of sync. ildasm uses the pdb file to read the variable names, and other infos. So when it tries to read them from the pdb, which doesn’t match the assembly, it may crash.
You can read the bug reported at Microsoft. It’s somewhat a corner case, so it’s not really critical. But if ever you face the same symptoms while disassembling an assembly generated by Cecil, you can try to delete the pdb.

