【问题标题】:A bit lost with ILMergeILMerge 有点失落
【发布时间】:2012-03-23 07:28:20
【问题描述】:

感谢您花时间帮助我。 使用:Microsoft Visual C# 2010 Express

我有两个文件:RJFCModPackInstaller.exe 和 Ionic.Zip.dll 我想合并为一个:RJFCModpackInstaller.exe

我已尝试进行后期构建并尝试了多个 GUI,我可以/应该做什么?

我试过用这个:

"$(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

但是出现了这个错误:

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

编辑: 如果我将代码更改为:

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

我收到错误 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

【问题讨论】:

  • Windows 错误代码 3 是“系统找不到指定的路径”。或 ERROR_PATH_NOT_FOUND。这表明路径而不是文件名有问题。
  • 你 2010 对不起。我累得要命哈哈。必须弄清楚这一点!

标签: c# dll ilmerge


【解决方案1】:

这里有一个额外的\:

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

所以我建议改变

$(SolutionDir)\deploy

到

$(SolutionDir)deploy

9009 错误是因为您现在已经从命令周围删除了引号(因此它正在尝试执行 C:\Program)。把这些引号放回去(或者恢复到你原来的命令,只是没有额外的\)。

【讨论】:

    猜你喜欢
    • 2023-03-19
    • 1970-01-01
    • 2011-12-24
    • 2011-11-06
    • 1970-01-01
    • 1970-01-01
    • 2019-07-13
    • 2016-05-13
    • 1970-01-01
    相关资源
    最近更新 更多