ILMerge in MSBuild

<!–Use of included script samples are subject to the terms specified at Written by Jomo Fisher–><Project  DefaultTargets=”Build”  xmlns=”″>  <Import Project=”$(MSBuildBinPath)\Microsoft.CSharp.targets” />  <Target Name=”AfterBuild”>   <CreateItem Include=”@(ReferencePath)” Condition=”‘%(CopyLocal)’==’true'”>       <Output TaskParameter=”Include” ItemName=”IlmergeAssemblies”/>   </CreateItem>   <Exec Command=”&quot;$(ProgramFiles)\Microsoft\Ilmerge\Ilmerge.exe&quot; /out:@(MainAssembly) &quot;@(IntermediateAssembly)&quot; @(IlmergeAssemblies->’&quot;%(FullPath)&quot;’, ‘ ‘)”/>   <!–Delete Files=”@(ReferenceCopyLocalPaths->’$(OutDir)%(DestinationSubDirectory)%(Filename)%(Extension)’)”/–> </Target>  <Target Name=”_CopyFilesMarkedCopyLocal”/> </Project>


Hack the Build: Use ILMerge and MSBuild to Combine Multiple Assemblies into One

Jomo Fisher–Over the last few years I’ve been coding mostly in C#–before that, my day-to-day work was done in C++. I don’t miss much about C++, but one of the things that I do miss is the ability to link many .LIB files into a single DLL or EXE I’ve known that it was possible…