ILmerge generating only 64bit compatible exe

863 views Asked by At

I am building up my VS2010 project using "any cpu configuration" so that the executable can work for both 32 bit and 64 bit versions.

But after using ILMerge to generate a bundled exe, the resultant exe is only working in 64 bit system and for 32 bit system its showing

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.

The ILMerge command used:

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

I tried to figure out any option in ILMerge to fix this, but do not find anything useful.

Any help on this will be of great help.

1

There are 1 answers

0
Kallol On

Figured out is the issue with Nlog.dll which was built in 64 bit environment. Fixed after converting it to Any Cpu