ILMerge Best Practices

前端 未结 12 2172
闹比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:32

    I use ILMerge for almost all of my different applications. I have it integrated right into the release build process so what I end up with is one exe per application with no extra dll's.

    You can't ILMerge any C++ assemblies that have native code. You also can't ILMerge any assemblies that contain XAML for WPF (at least I haven't had any success with that). It complains at runtime that the resources cannot be located.

    I did write a wrapper executable for ILMerge where I pass in the startup exe name for the project I want to merge, and an output exe name, and then it reflects the dependent assemblies and calls ILMerge with the appropriate command line parameters. It is much easier now when I add new assemblies to the project, I don't have to remember to update the build script.

提交回复
热议问题