Tips for ILMerge

ILMerge is a utility that can be used to merge multiple .NET assemblies into a single assembly. It is freely available for use from the Tools & Utilities page at theMicrosoft .NET Framework Developer Center.

While using this tool, I encouter some problems, the tips are collected as following:

1. Using ILMerge with v4.0

ILMerge should work just fine with newer versions of .NET. Just use the option: /targetplatform:v4,<path to your v4 framework directory>. For version 3.5, you probably don't need to set the target platform, but you may need to add the v3.5 framework directory as a /lib option so that assemblies from there can be found. (Unless they're in the GAC in which case they'll be found anyway.) To run ILMerge in the v4.0 runtime, use thisconfig file

2. Merging WPF assemblies 

ILMerge is not able to merge WPF assemblies. They contain resources with encoded assembly identities. ILMerge is unable to deserialize the resources, modify the assembly identities, and then re-serialize them. Sorry! 

 

原文地址:https://www.cnblogs.com/xixifusigao/p/1945334.html