You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was able to use AppMetrics in a portion of a project that does not use Native AoT and I liked it!
But then I added it to the part of the project that uses Native AoT and it causes the app to not work due to issues with reflection and trimming. The issue starts with a logging class but here may be other additional issues.
There may be a solution that consumers of the library can use (from the docs below) to allow the library to function with Native AoT, but I am not sure. I think there may be annotations or refactoring required in the library itself.
I figured I would log this issue as I had looked for a report of it and found none.
If anyone wants to collaborate on debugging this I'm up for doing a code pairing over Google Meets or similar.
Overview
I was able to use AppMetrics in a portion of a project that does not use Native AoT and I liked it!
But then I added it to the part of the project that uses Native AoT and it causes the app to not work due to issues with reflection and trimming. The issue starts with a logging class but here may be other additional issues.
There may be a solution that consumers of the library can use (from the docs below) to allow the library to function with Native AoT, but I am not sure. I think there may be annotations or refactoring required in the library itself.
I figured I would log this issue as I had looked for a report of it and found none.
If anyone wants to collaborate on debugging this I'm up for doing a code pairing over Google Meets or similar.
Self-Contained Reproducible Example
https://github.com/huntharo/app.metrics-native-aot
The example has two console apps:
Docs on Issues with Trimming
https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/prepare-libraries-for-trimming?pivots=dotnet-8-0#resolve-trim-warnings
The text was updated successfully, but these errors were encountered: