Skip to content

Instantly share code, notes, and snippets.

@3F
Created February 19, 2020 19:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 3F/b651430f601c99e9f10abf3a8482d3e3 to your computer and use it in GitHub Desktop.
Save 3F/b651430f601c99e9f10abf3a8482d3e3 to your computer and use it in GitHub Desktop.
ILMerge and other related 3rd party tool for .NET DllExport
<!-- https://ko-fi.com/post/ILMerge-and-other-related-3rd-party-tool-for--NET-Y8Y71FVU4 -->
...
<!-- For .NET DllExport 1.7 -->
<Target Name="Merging" BeforeTargets="DllExportMod">
<Copy SourceFiles="$(DllExportMetaLibFullPath)"
DestinationFolder="$(TargetDir)"
SkipUnchangedFiles="true"
OverwriteReadOnlyFiles="true" />
<Exec Command="$(ILMergeConsolePath) Conari.dll $(TargetFileName) /out:$(TargetFileName) /ndebug"
WorkingDirectory="$(TargetDir)"
ContinueOnError="true" />
<Delete Files="$(TargetDir)$(DllExportMetaLibName)" ContinueOnError="true" />
</Target>
<ItemGroup>
<PackageReference Include="Conari" Version="1.4.0" />
<PackageReference Include="ilmerge" Version="3.0.29" />
</ItemGroup>
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment