Skip to content

ILMerge Sample File

Michael Aguilar edited this page Apr 23, 2015 · 1 revision
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">   
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />     
  <Target Name="AfterBuild">     
    <CreateItem Include="@(ReferencePath)" Condition="'%(CopyLocal)'=='true' and '%(ReferencePath.IlMerge)'=='true'">     
      <Output TaskParameter="Include" ItemName="IlmergeAssemblies"/>     
    </CreateItem>     
    <Message Text="MERGING: @(IlmergeAssemblies->'%(Filename)')" Importance="High" />     
    <Exec Command="&quot;$(ProgramFiles)\Microsoft\Ilmerge\Ilmerge.exe&quot; /out:@(MainAssembly) &quot;@(IntermediateAssembly)&quot; @(IlmergeAssemblies->'&quot;%(FullPath)&quot;', ' ')" />     
  </Target>     
  <Target Name="_CopyFilesMarkedCopyLocal"/>     
</Project>
Clone this wiki locally