title: Merging dlls using ILMerge
body: <p>I am trying to merge some dlls into one merge dll using ILMerge.
  i have tried several post build commands and nothing worked.</p>
  
  <p><code>C:\Program Files (x86)\Microsoft\ILMerge\ILMerge.exe /lib:C:\Windows\Microsoft.NET\Framework\v4.0.30319 
  /lib:”C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies” 
  /t:dll /closed /targetplatform:v4,
  ”C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0″ /out:DataAccessMerged.dll Frameworks.dll ObservableDictionary.dll</code></p>
  
  <p><strong>OR</strong></p>
  
  <p>placed the macros even of <code>TargetDir</code> and so on....</p>
  
  <p>it didnt work.
  the .net frameworks is 4 my vs is 2010 sp1.</p>
  
  <hr>
  
  <p>Well guys. I hope this help someone.
  The problem is of course frameworks 4, there are several ways to solve this issue.
  my way is to create a  ILMerge.exe.config file to the ILMerge exe, and enter this xml
  <code>
  &lt;configuration&gt;
      &lt;startup useLegacyV2RuntimeActivationPolicy="true"&gt;
          &lt;requiredRuntime safemode="true" imageVersion="v4.0.30319" version="v4.0.30319"/&gt;
      &lt;/startup&gt;
  &lt;/configuration&gt;
  </code></p>