A bit lost with ILMerge

本小妞迷上赌 提交于 2021-02-08 03:29:12

问题


Thanks for taking some time to help me out. Using: Microsoft Visual C# 2010 Express

I have two files: RJFCModPackInstaller.exe and Ionic.Zip.dll That i'd like to merge in to one: RJFCModpackInstaller.exe

I've tried to do post-build and havetried multiple GUIs, what can/should I do?

I tried using this:

"$(SolutionDir)ILMerge\ILMerge.exe" /out:"$(SolutionDir)\deploy\$(TargetFileName)" "$(TargetDir)$(TargetFileName)" "$(TargetDir)*.dll" /target:exe /targetplatform:'v4, C:\Windows\Microsoft.NET\Framework64\v4.0.30319' /wildcards

But came out with this error:

Error   2   The command ""C:\Users\FusionD\documents\visual studio 2010\Projects\RJFCModPackInstaller\ILMerge\ILMerge.exe" /out:"C:\Users\FusionD\documents\visual studio 2010\Projects\RJFCModPackInstaller\\deploy\RJFCModPackInstaller.exe" "C:\Users\FusionD\documents\visual studio 2010\Projects\RJFCModPackInstaller\RJFCModPackInstaller\bin\Release\RJFCModPackInstaller.exe" "C:\Users\FusionD\documents\visual studio 2010\Projects\RJFCModPackInstaller\RJFCModPackInstaller\bin\Release\*.dll" /target:exe /targetplatform:'v4, C:\Windows\Microsoft.NET\Framework64\v4.0.30319' /wildcards" exited with code 3.   RJFCModPackInstaller

EDIT: If I change the code to:

C:\Program Files (x86)\Microsoft\ILMerge\ILMerge.exe /out:"$(SolutionDir)deploy\$(TargetFileName)" "$(TargetDir)$(TargetFileName)" "$(TargetDir)*.dll" /target:exe /targetplatform:'v4, C:\Windows\Microsoft.NET\Framework64\v4.0.30319' /wildcards

I get error 9009:

Error   1   The command "C:\Program Files (x86)\Microsoft\ILMerge\ILMerge.exe /out:"C:\Users\FusionD\documents\visual studio 2010\Projects\RJFCModPackInstaller\deploy\RJFCModPackInstaller.exe" "C:\Users\FusionD\documents\visual studio 2010\Projects\RJFCModPackInstaller\RJFCModPackInstaller\bin\Debug\RJFCModPackInstaller.exe" "C:\Users\FusionD\documents\visual studio 2010\Projects\RJFCModPackInstaller\RJFCModPackInstaller\bin\Debug\*.dll" /target:exe /targetplatform:'v4, C:\Windows\Microsoft.NET\Framework64\v4.0.30319' /wildcards" exited with code 9009.  RJFCModPackInstaller

回答1:


There's an extra \ here:

/out:"C:\Users\FusionD\documents\visual studio 2010\Projects\RJFCModPackInstaller\\deploy
                                                                                          ^
                                                                                          |

So I'd suggest changing

$(SolutionDir)\deploy

to

$(SolutionDir)deploy

The 9009 error is because you've removed the quotes from around the command now (so it's trying to execute C:\Program). Put those quotes back (or revert to your original command, just without the extra \).



来源:https://stackoverflow.com/questions/9835494/a-bit-lost-with-ilmerge

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