ILMerge Best Practices

前端 未结 12 2206
闹比i
闹比i 2020-11-28 20:19

Do you use ILMerge? Do you use ILMerge to merge multiple assemblies to ease deployment of dll\'s? Have you found problems with deployment/versioning in production after ILMe

12条回答
  •  时光说笑
    2020-11-28 20:34

    It seems to me like the #1 ILMerge Best Practice is Don't Use ILMerge. Instead, use SmartAssembly. One reason for this is that the #2 ILMerge Best Practice is to always run PEVerify after you do an ILMerge, because ILMerge does not guarantee it will correctly merge assemblies into a valid executable.

    Other ILMerge disadvantages:

    • when merging, it strips XML Comments (if I cared about this, I would use an obfuscation tool)
    • it doesn't correctly handle creating a corresponding .pdb file

    Another tool worth paying attention to is Mono.Cecil and the Mono.Linker [2] tool.

    [2]: http:// www.mono-project.com/Linker

提交回复
热议问题