C # Use ilmerge to compress all referenced DLL and exe files into an EXE file
Address: http://www.cnblogs.com/hongfei/archive/2013/03/14/2958627.html#2634561
Ilmerge:Http://www.microsoft.com/downloads/details.aspx? Familyid = 22914587-b4ad-4eae-87cf-b14ae6a939b0 & displaylang = en
Install the SDK directly by default after the download. After installation, there will be three files.
run the Program of the winform, copy the DLL and exe files in the bin \ DEBUG directory to the ilmerge installation directory.
open CMD
Go to the installation directory: cd c: \ Program Files (x86) \ Microsoft \ ilmerge
Ilmerge.exe/ndebug/Target: winexe/Out: egofixhelper.exe /Log egohelper.exe Es2007.dll cxcore. dll InterOP. egokernel. dll fixbpmes. dll
1. Name of the output exe
2. EXE name before merging
3. All DLL files to be merged are separated by spaces.
Other examples:
Merge file1.dll1_file2.dllwith myapp.exeto newapp.exe
Ilmerge/ndebug/Target: winexe/out: C: \ newapp.exe/log c: \ myapp.exe c: \ file1.dll c: \ file2.dll