I have an issue with ILMerge, latest release 2.12.0803. Even my assemblies have processor architecture set to MSIL, the output merged assembly has x86.
The way I run ILMerge is:
ILMerge.exe /t:library /targetPlatform="v4,C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0" /keyfile:key.snk /output:"Test.dll" a.dll b.dll ... other assemblies
On build time I have a warning:
There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "Test", "x86"
and at run-time I get a File Not found Exception:
Could not load file or assembly 'Test, Version=3.9.32.0, Culture=neutral, PublicKeyToken=8fd4d0b13dde34b0' or one of its dependencies. The system cannot find the file specified.
Running gacutil:
C:\Windows\system32>gacutil /l "Test, Version=3.9.32.0, Culture=neutral, PublicKeyToken=8fd4d0b13dde34b0" Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.17929 Copyright (c) Microsoft Corporation. All rights reserved.
The Global Assembly Cache contains the following assemblies: Test, Version=3.9.32.0, Culture=neutral, PublicKeyTok en=8fd4d0b13dde34b0, processorArchitecture=x86
Is there a way to change the processorArchitecture to MSIL for the merged assembly?