ILmerge只生成64位兼容的exe

时间:2013-12-11 16:53:51

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

我正在使用“任何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中的任何选项来解决这个问题,但是找不到任何有用的东西。

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

1 个答案:

答案 0 :(得分:0)

弄清楚Nlog.dll是在64位环境中构建的问题。将其转换为Any Cpu

后修复