title: Issue when using ILMerge to merge .NET 3.5 & .NET 2.0 assemblies
body: <p>When attempting to merge several assemblies in a VS Post Build I ran into the issue:</p>
  
  <pre><code>ILMerge version 2.13.307.0
  Copyright (C) Microsoft Corporation 2004-2006. All rights reserved.
  ILMerge /out:Assembly.dll AssemblyA.dll AssemblyB.dll /targetplatform:v2,C:\Windows\Microsoft.NET\Framework\v3.5 /log:log.txt 
  Set platform to 'v2', using directory 'C:\Windows\Microsoft.NET\Framework\v3.5' for mscorlib.dll
  An exception occurred during merging:
  Unable to cast object of type 'System.Compiler.Class' to type 'System.Compiler.Struct'.
     at System.Compiler.SystemTypes.Initialize(Boolean doNotLockFile, Boolean getDebugInfo, PostAssemblyLoadProcessor postAssemblyLoad)
     at ILMerging.ILMerge.Merge()
     at ILMerging.ILMerge.Main(String[] args)
  </code></pre>
  
  <p>where AssemblyA is the current project output $(TargetFileName) and AssemblyB is a referenced assembly.</p>
  
  <ol>
  <li>AssemblyA => v3.5</li>
  <li>AssemblyB => v2.0</li>
  </ol>
  
  <p>The weird thing is that when I change the command to use .NET 4 it works:</p>
  
  <pre><code>ILMerge /out:Assembly.dll AssemblyA.dll AssemblyB.dll /targetplatform:v4,C:\Windows\Microsoft.NET\Framework\v4.0.30319 /log:log.txt
  </code></pre>
  
  <p>Since I wish the merged assembly to be version 3.5 and not 4 how do I get the former command to work or how do I resolve this error?</p>