sentry-dotnet
sentry-dotnet copied to clipboard
Replace AotHelper.IsNativeAot with FeatureGuardAttribute
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...