title: ILMerge question
body: <p>I'm trying to merge multiple assemblies into one as my 'Proxy' assembly for a WCF service. Currently, users of the Proxy need to reference the assembly containing the data contracts, and also my domain assembly because of my inheritance schemes.</p>
  
  <p>I'd like to use ILMerge for this. In particular, the ILMerge-Tasks project looks promising, especially this line from their project home:</p>
  
  <p><strong>ILMerge-Tasks Project Home:</strong></p>
  
  <blockquote>
    <p>...It even includes a post-build event that merges ILMerge and the task dll so that you can use the task without ILMerge.exe being present. </p>
  </blockquote>
  
  <p>This is precisely what i'd like to accomplish, but i really have no idea how to go about it. Please help!</p>
  
  <p><strong>Other relevant (perhaps) info:</strong></p>
  
  <ul>
  <li>We are using automated builds in TFS, so not having <em>ilmerge.exe</em> present will be a big plus</li>
  </ul>
  
  <p><strong>Update:</strong></p>
  
  <p>So I included the ILMerge.MSBUild.Tasks.dll in my project and added the following to my build file (taken from ilmerge project home):</p>
  
  <pre><code>&lt;Target Name="AfterBuild"&gt;
  
      &lt;UsingTask TaskName="ILMerge.MSBuild.Tasks.ILMerge" 
          AssemblyFile="ILMerge.MSBuild.Tasks.ILMerge"/&gt;
      &lt;ItemGroup&gt;
         &lt;MergeAsm Include="BarProject.dll" /&gt;
         &lt;MergeAsm Include="FooProject.dll" /&gt;
      &lt;/ItemGroup&gt;
  
      &lt;ILMerge InputAssemblies="@(MergeAsm)" OutputFile="FooBar.dll" /&gt;
  &lt;/Target&gt;
  </code></pre>
  
  <p>But now I get the following error:</p>
  
  <blockquote>
    <p>The "UsingTask" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with  in the project file, or in the *.tasks files located in the "C:\Windows\Microsoft.NET\Framework\v4.0.30319" directory.</p>
  </blockquote>