In order to ensure this library works with native AOT, we should have a test as described in https://devblogs.microsoft.com/dotnet/creating-aot-compatible-libraries/#analyzing-.net-libraries. We currently have the Roslyn Analzyers enabled, but the analyzers unfortunately can't catch all issues. We can follow other repos implementations for this. A good starting point would be https://github.com/dotnet/extensions/tree/main/test/Libraries/Microsoft.Extensions.AotCompatibility.TestApp https://github.com/dotnet/extensions/blob/799a1db854dac00e51b0765bdd6cd3494b4b6b5d/eng/pipelines/templates/BuildAndTest.yml#L119-L121
In order to ensure this library works with native AOT, we should have a test as described in https://devblogs.microsoft.com/dotnet/creating-aot-compatible-libraries/#analyzing-.net-libraries. We currently have the Roslyn Analzyers enabled, but the analyzers unfortunately can't catch all issues.
We can follow other repos implementations for this. A good starting point would be
https://github.com/dotnet/extensions/tree/main/test/Libraries/Microsoft.Extensions.AotCompatibility.TestApp
https://github.com/dotnet/extensions/blob/799a1db854dac00e51b0765bdd6cd3494b4b6b5d/eng/pipelines/templates/BuildAndTest.yml#L119-L121