【发布时间】: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