How to use ilMerge to merge dll’s into an exe file?
Asked Answered
T

1

11

I tried:

C:\Windows\System32>ilmerge /target:winexe /out:c:\output.exe c:\MyProgram.exe c:\Microsoft.WindowsAPICodePack.dll

But got:

'ilmerge' is not recognized as an internal or external command, operable program or batch file.

What am I doing wrong? (And by the way, is there a better way to merge dll’s into an exe file?)

Thanks

Trisoctahedron answered 14/8, 2011 at 11:18 Comment(0)
B
15

This is not a programming question... but you need to install ILMERGE and make sure that it is either in the path or that you fully reference the path. ILMERGE is not a built-in command that you can just use...

As for alternatives, you could embed them as embedded resources and load them on demand from there. Jeffrey Richter wrote how to do just that.

Befoul answered 14/8, 2011 at 11:22 Comment(3)
I already installed ilMerge. What do you mean "make sure that it is either in the path or that you fully reference the path" – do you mean the path to ilMerge? (because the files were referenced by the full path.) How do I do that?Trisoctahedron
Yes the path to ILMERGE. The command prompt cannot find ILMERGE, it looks in the current path and all paths stored in the PATH environment variable. If it isn't there, you need to fully qualify the path to ILMERGE, such as by writing "C:\Program Files\Microsoft\ILMerge\ILMerge.exe" (including the quotes) - make sure to fix the path to match your install directory.Befoul
Thanks a lot. Including, for the link above!Trisoctahedron

© 2022 - 2024 — McMap. All rights reserved.