Skip to content

Instantly share code, notes, and snippets.

@Seikilos
Created August 1, 2014 09:35
Show Gist options
  • Save Seikilos/3f2c85d33dba30ead129 to your computer and use it in GitHub Desktop.
Save Seikilos/3f2c85d33dba30ead129 to your computer and use it in GitHub Desktop.
Small msbuild target to merge assemblies (without requiring the ILMerge.Task)
<?xml version="1.0" encoding="utf-8"?>
<!--
C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe ilmerge.msbuild.xml /p:out=Dependencies.dll /p:dir=dir_with_assemblies_to_merge
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ILPath>packages\ilmerge.2.13.0307\ILMerge.exe</ILPath>
</PropertyGroup>
<ItemGroup>
<AllFiles Include="$(dir)\*.dll"/>
</ItemGroup>
<Target Name="Merge">
<Message Text="Merging into $(out) from dir $(dir)"/>
<Exec Command="$(ILPath) /out:$(out) @(AllFiles->'$(dir)\%(filename)%(extension)', ' ')" />
</Target>
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment