C# package dll into program

This article tells you how to package the dll into the program. In many cases, the software needs to include a lot of dll or other files when it is running. For such software to be given to other small partners, it is necessary to make a compressed package or use the installation software. This doesn't feel good, so this article tells you a way to put all the dlls in one file, so to give your own software to a small partner, you only need to give him a program

ILMerge

First download ILMerge

Then install it, it feels very easy to install

If there are 1.exe and 1.dll to merge 1.dll into 2.exe then you can use the following code

ilmerge  /target:exe /out:E:\2.exe /log E:\1.exe /log E:\1.dll /targetplatform:v4

The target here is the target platform

out is the output file

log is the dll to be merged

After executing the code, you can get 2.exe and directly give this file to the friend. He doesn't need to use the compressed package. If he directly opens 2.exe, he will not say that the library cannot be found.

See also: http://www.cnblogs.com/blqw/p/LoadResourceDll.html

ILMerge merges source DLL into target EXE - HackerVirus - Blog Park

I built my own blog https://lindexi.gitee.io/ Welcome everyone to visit, there are many new blogs in it. I will only put it on csdn or blog garden after I see that the blog is mature, but it will not be updated once it is published

If you see anything you don’t understand on the blog, welcome to communicate. I have built a dotnet vocational and technical college. Welcome everyone to join.

Creative Commons License
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. You are welcome to reprint, use, and republish, but be sure to keep the article's signature Lin Dexi (including the link: http://blog.csdn.net/lindexi_gd ), and must not be used for commercial purposes. Works modified based on this article must be released with the same license. If you have any questions, please contact me .

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325030845&siteId=291194637