如何使用ilMerge将dll合并到一个exe文件? [英] How to use ilMerge to merge dll into an exe file?

查看:660
本文介绍了如何使用ilMerge将dll合并到一个exe文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

将.dll与.exe合并

好吧,我有所有的ilmerge的文件,以及.exe(CabalMain.exe)和dll(crckd.dll)在一个路径。 C:\Program Files(x86)\Microsoft\ILMerge

Okay, so... I have all the files of ilmerge, along with the .exe (CabalMain.exe) and the dll (crckd.dll) in one path. C:\Program Files (x86)\Microsoft\ILMerge

I shift> up命令提示符。
因为我想合并两个我输入:

I shift>rightclick folder and open up command prompt. Since I'd like to merge the two I enter:

    C:\Program Files (x86)\Microsoft\ILMerge>C:\Program Files (x86)\Microsoft\ILMerg
e\ilmerge C:\Program Files (x86)\Microsoft\ILMerge\Cabalmain.exe C:\Program File
s (x86)\Microsoft\ILMerge\crckd.dll /out:C:\Program Files (x86)\Microsoft\ILMerg
e

(我相信这是正确的合并过程)
我收到了

(I believe that is the correct process to merge) And I received

C:\Program Files (x86)\Microsoft\ILMerge>C:\Program Files (x86)\Microsoft\ILMerg
e\ilmerge C:\Program Files (x86)\Microsoft\ILMerge\Cabalmain.exe C:\Program File
s (x86)\Microsoft\ILMerge\crckd.dll /out:C:\Program Files (x86)\Microsoft\ILMerg
e

我还没有给它,我是一个完全imbecile,当谈到这个;简单的说明将不胜感激。
感谢高级!

In case I didn't yet give it away, I'm a complete imbecile when it comes to this; simple instructions would be appreciated. Thanks in advanced!

推荐答案

由于你现在已经复制了ilmerge的程序文件夹中的每一个东西正确的命令(从ilmerge文件夹)应该是:

As you have now copied every thing in the programs folder of ilmerge (which is not wise and was adviced against in the duplicate question) the correct command (from the ilmerge folder) should be:

ilmerge cabalmain.exe crckd.dll /out:%userprofile%\cabalmainmerged.exe

如果没有显示错误,键入 start%userprofile%,并在打开的资源管理器窗口中找到cabalmainmerged.exe

If no errors are shown you can type start %userprofile% and in the explorer window that opens you should find cabalmainmerged.exe

程序集意味着您尝试合并的exe或dll文件不会复制到正确的文件夹。如果exe或dll中的一个依赖于其他程序集,它们都必须在同一个文件夹中。

'Could not load assembly ' means that the exe or dll files that you try to merge are not copied to the correct folder. If one of the exe or dll's depend on other assemblys they all have to be in the same folder.

Wiser是有一个文件夹c:\merge,并复制该文件夹中的所有相关文件。然后启动一个命令提示符和

Wiser is to have a folder c:\merge and copy all relevant files in that folder. Then start a commandprompt and

cd\merge


然后

"C:\Program Files (x86)\Microsoft\ILMerge\ilmerge" "yourexe.exe" "your1stdll.dll" /out mergedexe.exe

这篇关于如何使用ilMerge将dll合并到一个exe文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆