问题
Is there a free tool capable of pruning unused code from a CLI assembly?
I know there are obfuscators that are capable of performing this optimization, but these all cost money. Is there a free (or even open source) tool that removes the unused code in an already compiled assembly?
回答1:
There is. It's called the Mono.Linker.
What I wrote three years about the Mono.Linker ago pretty much still stands. It works well, but it's not magical and could be pretty rough. Plus it usually requires configuration.
On the other hand, it now ships in commercial tools like MonoTouch or Mono for Android, so it's definitely solid, if you don't mind spending some time integrating it.
Note that all released versions of Mono comes with a compiled version of the linker, but I advise you to compile it yourself.
来源:https://stackoverflow.com/questions/9772873/is-there-a-free-tool-capable-of-pruning-unused-code-from-a-cli-assembly