Ilmerge Tools merge multiple DLLs or EXE

Source: Internet
Author: User

This is a tool that Microsoft offers to merge multiple DLLs or merge DLLs into EXE

First download the tool: Ilmerge

http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=17630

Merging into DLLs:

C:\Program Files (x86) \microsoft\ilmerge>ilmerge/log/t:dll/out:d:\temp\myexcel\bobatools.dll D:\product\ Ilolidll\ilolidll\bin\debug\npoi.dll D:\product\IloliDll\IloliDll\bin\Debug\IloliDll.dll
(The last two are the source files to be merged, and the multiple source files are separated by an empty space.) DLLs that may be written by themselves during a DLL merge will use this ICSharpCode.SharpZipLib.dll, which is the DLL project that is generated in the same directory as the DLL file. If you do not have this file, rebuild your DLL project so that the ICSharpCode.SharpZipLib.dll file is out, or the merge may fail)

Merge into EXE:

Ilmerge/ndebug/target:exe/targetplatform:v1.1/out:newclient.exe Oldclient.exe/log AutoUpdater.dll DockingSuite.dll DocumentManager.dll FileHelpers.dll OutlookBar.dll SandBar.dll ICSharpCode.SharpZipLib.dll

The explanations are as follows:
/target: [Must have options] can be abbreviated to/T: Specify the type of output components, there is dll/exe/winexe; (in the case of EXE, a DOS window (even a WinForm program) will appear when the program executes. So the target should be set to winexe)
/targetplatform:[can have no] output component of the. NET run version;
/out: [Mandatory options] The full name of the merged component;
/log: [Can not] display process log on screen
The following is the main merged component name, and all other DLLs associated with it;
The above example is only merged into EXE, or multiple DLLs can be combined into one DLL for use, the respective namespaces will not change;

1. You cannot merge interop, a DLL that is converted by COM; (Can be merged, but dependent DLLs must also be merged together, the first time when the merger only Excel.dll, always error, think it is the sake of interop, later found that there is no merge Vbide.dll sake, copied to the directory and merged together, all OK.)
2. If you have a resource DLL, The oldclient.exe that should be merged should first be changed to a different name, and then the merged output will be named: Oldclient.exe, because the resource file name is: Oldclient.resources.dll, and Ilmerge cannot merge the resource files, otherwise the resource file cannot be found after the export. (If you know how to merge resource files, please advise, thank you)
3. Although the combined EXE is relatively large, but in the user there is only one exe, so more intuitive, and easy to upgrade maintenance.

Ilmerge Tools merge multiple DLLs or EXE

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.