Merging .dll with .exe

允我心安 提交于 2019-11-27 04:51:27

问题


I'm trying to merge CabalMain.exe with crckd.dll I downloaded ilmerge, and went into >Program giles (x86)>Microsoft > Ilmerge I then did this.

    C:\Program Files (x86)\Microsoft\ILMerge>ilmerge CabalMain.exe crckd.dll /out:me
    rged.exe
    An exception occurred during merging:
    ILMerge.Merge: Could not load assembly from the location 'C:\Program Files (x86)
    \Microsoft\ILMerge\CabalMain.exe'. Skipping and processing rest of arguments.
       at ILMerging.ILMerge.Merge()

   at ILMerging.ILMerge.Main(String[] args)

Can anyone help me understand what I did wrong?


回答1:


You need to specify the full path of the files you want to merge, not just their names. Otherwise ILMerge is looking for the in the same directory it is installed in:

C:\Program Files (x86)\Microsoft\ILMerge>ilmerge C:\path\to\your\program\CabalMain.exe C:\path\to\your\program\crckd.dll /out:C:\path\to\your\program\merged.exe

You also probably want to specify a path on out, otherwise it will try to write it into Program Files (which has a good chance of failing due to permissions).



来源:https://stackoverflow.com/questions/14551311/merging-dll-with-exe

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!