sharpkml icon indicating copy to clipboard operation
sharpkml copied to clipboard

Support for NativeAOT / full trimming

Open tipa opened this issue 1 year ago • 0 comments
trafficstars

At the moment, the library is not trimming safe an building an app with NativeAOT produces this warning: warning IL2104: Assembly 'SharpKml.Core' produced trim warnings. For more information see https://aka.ms/dotnet-illink/libraries

Currently, in my .NET Mac App I have to manually exclude certain types from being linked away (using an LinkDescription.xml file) - otherwise the app crashes when using the library:

<?xml version="1.0" encoding="utf-8"?>
<linker>
  <assembly fullname="SharpKml.Core">
    <type fullname="SharpKml.Dom.*" />
  </assembly>
</linker>

Making the app trimming-safe would fix both the warning and the need for this workaround

tipa avatar Sep 26 '24 12:09 tipa