Assemblies Merging

Assemblies Merging allows a set of assemblies to be combined into a single file. This can be used to merge an executable file with its supporting dynamic linked libraries (DLLs) to allow you to distribute a runnable program as a single file.
It can also be used to simplify large libraries that would otherwise include multiple DLLs with each needing to be referenced from the project that utilizes them. Merging reduces the total size of the deployment and improves the application load time because the windows loader doesn't have to load lots of dll files.

How Assemblies Merging Works?

Assemblies merging takes a set of input assemblies and merges them into one target assembly. The first assembly in the list of input assemblies is the primary assembly. When the primary assembly is an executable, then the target assembly is created as an executable with the same entry point as the primary assembly. Also, if the primary assembly has a strong name, and a signature file is provided, then the target assembly is re-signed with the specified key so that it also has a strong name. Assemblies merging occurs before any other protection operation, therefore if assemblies merging is used all protection settings set for secondary assemblies are ignored. The protection settings for the merged assembly are set by the primary assembly.

C++/CLI assemblies

Assemblies written in C++/CLI language can only be selected as primary assembly, you can't use assemblies merging for C++/CLI assemblies set as secondary assemblies.

Using Assemblies Merging

assemblies merging

To enable assemblies merging:

  • Select the merging tab.
  • Select the primary assembly.
  • Select the secondary assemblies by checking the assemblies you want to merge with the primary assembly selected in previous step.