<?xml version="1.0" encoding="utf-8" ?>

<!-- See also https://github.com/ravibpatel/ILRepack.Lib.MSBuild.Task/issues/26 -->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <Target Name="ILRepacker" AfterTargets="Build" Condition="'$(Configuration)' == 'Release'">
        <ItemGroup>
            <InputAssemblies Include="$(OutputPath)WireMock.Net.MimePart.dll" />
            <InputAssemblies Include="@(ReferencePathWithRefAssemblies)" Condition="'%(filename)' == 'MimeKitLite'" />
            <LibraryPath Include="%(ReferencePathWithRefAssemblies.RelativeDir)" />
        </ItemGroup>
    
        <ItemGroup>
            <DoNotInternalizeAssemblies Include="WireMock.Net.MimePart" />
        </ItemGroup>
    
        <ILRepack
            Parallel="true"
            Internalize="true"
            RenameInternalized="true"
            InternalizeExclude="@(DoNotInternalizeAssemblies)"
            InputAssemblies="@(InputAssemblies)"
            LibraryPath="@(LibraryPath)"
            TargetKind="Dll"
            KeyFile="../../src/WireMock.Net/WireMock.Net.snk"
            OutputFile="$(OutputPath)$(AssemblyName).dll"
        />
    </Target>
</Project>