【问题标题】:ILmerge generating only 64bit compatible exeILmerge 只生成 64 位兼容的 exe
【发布时间】:2013-12-11 16:53:50
【问题描述】:

我正在使用“任何 cpu 配置”构建我的 VS2010 项目,以便可执行文件适用于 32 位和 64 位版本。

但是使用 ILMerge 生成捆绑的 exe 后,生成的 exe 只能在 64 位系统中运行,而对于 32 位系统则显示

This version of output.exe is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need a x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher.

使用的 ILMerge 命令:

C:\BuildTools\ilmerge.exe /out:proj1.exe output.exe 1.dll NLog.dll 2.dll targetplatform:v4 /ndebug

我试图找出 ILMerge 中的任何选项来解决此问题,但没有发现任何有用的东西。

对此的任何帮助都会有很大帮助。

【问题讨论】:

  • “3 位系统显示“不兼容”错误”不是一个充分的问题描述。
  • 当您尝试在 Windows XP 上运行 .NET 4.5 程序时会遇到这种错误。不要省略您尝试运行它的机器的详细信息。
  • 系统正在运行Windows 7 32 bit OS

标签: visual-studio-2010 c#-4.0 ilmerge


【解决方案1】:

发现是在 64 位环境中构建的 Nlog.dll 的问题。将其转换为 Any Cpu 后修复

【讨论】:

    猜你喜欢
    • 2023-03-30
    • 1970-01-01
    • 1970-01-01
    • 2010-10-21
    • 2013-03-12
    • 2021-10-18
    • 2019-06-26
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多