sentry-dotnet icon indicating copy to clipboard operation
sentry-dotnet copied to clipboard

Replace AotHelper.IsNativeAot with FeatureGuardAttribute

Open jamescrosswell opened this issue 4 months ago • 0 comments

We currently have our own bespoke implementaion of something that approximates what FeatureGuardAttribute does, to disable parts of our SDK in trimming/AOT scenarios at runtime.

net9.0 introduces a FeatureGuardAttribute that we should look at leveraging instead, to make this more easily identifiable and readable.

Note

We can also potentially use the FeatureSwitchDefinitionAttribute to define parts of the SDK that can be trimmed, to help users reduce the size of their apps. I'm not sure how that would work though - would need to play around with it to check...

jamescrosswell avatar Oct 16 '24 20:10 jamescrosswell