title: Build With ILMerge Error
body: <p>Has anyone had this error with IlMerge?  I am trying to merge a few assemblies for a .NET project using the 4.0 Framework.</p>
  
  <p>ILMerge /log /lib:..\Libraries /targetplatform:v4 /internalize:..\SolutionFiles\CJCommon.exclude /ndebug /out:bin\Release\Common.dll obj\Release\Common.dll C:\Development\CJCommon\Libraries\FluentNHibernate.dll C:\Development\CJCommon\Libraries\HibernatingRhinos.Profiler.Appender.dll C:\Development\CJCommon\Libraries\Iesi.Collections.dll C:\Development\CJCommon\Libraries\log4net.dll C:\Development\CJCommon\Libraries\Microsoft.Practices.ServiceLocation.dll C:\Development\CJCommon\Libraries\NHibernate.ByteCode.Castle.dll C:\Development\CJCommon\Libraries\NHibernate.dll C:\Development\CJCommon\Libraries\NHibernate.Linq.dll C:\Development\CJCommon\Libraries\StructureMap.dll </p>
  
  <p>Set platform to 'v4', using directory 'C:\Windows\Microsoft.NET\Framework64\v2.0.50727..\v4.0.20107' for mscorlib.dll</p>
  
  <p>An exception occurred during merging:</p>
  
  <p>Object reference not set to an instance of an object.</p>
  
  <pre><code> at System.Compiler.CoreSystemTypes.GetSystemAssembly(Boolean doNotLockFile, Boolean getDebugInfo)
   at System.Compiler.CoreSystemTypes.Initialize(Boolean doNotLockFile, Boolean getDebugInfo)
   at System.Compiler.SystemTypes.Initialize(Boolean doNotLockFile, Boolean getDebugInfo)
   at ILMerging.ILMerge.Merge()
   at ILMerging.ILMerge.Main(String[] args)
  </code></pre>
  
  <p>C:\Program Files (x86)\MSBuild\Ilmerge.CSharp.targets(8,5): error MSB3073: The command ""C:\Program Files (x86)\Microsoft\Ilmerge\Ilmerge.exe" /log /lib:"..\Libraries" /targetplatform:v4 /internalize:./.exited with code 1...</p>
  
  <p>...</p>
  
  <p>========== Rebuild All: 3 succeeded, 1 failed, 0 skipped ==========</p>