================================start 合并dll ==============================
<Target Name="ILMerge">
<Exec Command=""$(ILMergeConsolePath)" /ndebug /target:dll /out:$(OutputPath)MongoDBAdapter.dll /log $(OutputPath)MongoDB.Bson.dll /log $(OutputPath)MongoDB.Driver.dll /log $(OutputPath)MongoDB.Driver.Core.dll /log $(OutputPath)MongoDB.Libmongocrypt.dll /log $(OutputPath)MongoDBClass.dll /targetplatform:v4" />
</Target>
<Target Name="_ProjectRemoveDependencyFiles" AfterTargets="AfterBuild" DependsOnTargets="ILMerge">
<ItemGroup>
<_ProjectDependencyFile Include="$(OutputPath)MongoDB.Bson.dll" />
<_ProjectDependencyFile Include="$(OutputPath)MongoDB.Driver.dll" />
<_ProjectDependencyFile Include="$(OutputPath)MongoDB.Driver.Core.dll" />
<_ProjectDependencyFile Include="$(OutputPath)MongoDB.Libmongocrypt.dll" />
</ItemGroup>
<Delete Files="@(_ProjectDependencyFile)" />
</Target>
<Target Name="_ProjectRemoveDependencyFiles" AfterTargets="AfterBuild" DependsOnTargets="ILMerge">
<ItemGroup>
<_ProjectDependencyFile Include="$(OutputPath)Crc32C.NET.dll" />
<_ProjectDependencyFile Include="$(OutputPath)DnsClient.dll" />
<_ProjectDependencyFile Include="$(OutputPath)MongoDB.Bson.dll" />
<_ProjectDependencyFile Include="$(OutputPath)MongoDB.Driver.dll" />
<_ProjectDependencyFile Include="$(OutputPath)MongoDB.Driver.Core.dll" />
<_ProjectDependencyFile Include="$(OutputPath)MongoDB.Libmongocrypt.dll" />
<_ProjectDependencyFile Include="$(OutputPath)SharpCompress.dll" />
<_ProjectDependencyFile Include="$(OutputPath)Snappy.NET.dll" />
<_ProjectDependencyFile Include="$(OutputPath)System.Buffers.dll" />
<_ProjectDependencyFile Include="$(OutputPath)System.Runtime.InteropServices.RuntimeInformation.dll" />
<_ProjectDependencyFile Include="$(OutputPath)MongoDBClass.dll" />
</ItemGroup>
<Delete Files="@(_ProjectDependencyFile)" />
</Target>
<Exec Command=""$(ILMergeConsolePath)" /ndebug /target:dll /out:$(OutputPath)$(AssemblyName).dll /log $(OutputPath)Crc32C.NET.dll /log $(OutputPath)DnsClient.dll /log $(OutputPath)MongoDB.Bson.dll /log $(OutputPath)MongoDB.Driver.dll /log $(OutputPath)MongoDB.Driver.Core.dll /log $(OutputPath)MongoDB.Libmongocrypt.dll /log $(OutputPath)SharpCompress.dll /log $(OutputPath)Snappy.NET.dll /log $(OutputPath)System.Buffers.dll /log $(OutputPath)System.Runtime.InteropServices.RuntimeInformation.dll /log $(OutputPath)MongoDBClass.dll /targetplatform:v4" />
ilmerge /ndebug /target:dll /out:MongoDBClass.dll /log Crc32C.NET.dll /log DnsClient.dll /log MongoDB.Bson.dll /log MongoDB.Driver.dll /log MongoDB.Driver.Core.dll /log MongoDB.Libmongocrypt.dll /log Newtonsoft.Json.dll /log SharpCompress.dll /log Snappy.NET.dll /log System.Buffers.dll /log System.Runtime.InteropServices.RuntimeInformation.dll /targetplatform:v4
================================end==============================