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
{{ message }}
Repository navigation
Native AOT crashes have no release when it comes from the .NET default #5648
On Native AOT, SentrySdk.InitHub resolves the environment before it initialises sentry-native, but not the release (resolve, init). CFunctions passes a release to sentry-native only when SentryOptions.Release is set (source), and IScopeObserver has no way to set one afterwards.
sentry-native falls back to the SENTRY_RELEASE environment variable by itself (source). What it never receives is the .NET SDK's default release, which is the entry assembly's name@version from SettingLocator.GetRelease.
Impact
Suppose an app sets neither SentryOptions.Release nor SENTRY_RELEASE:
Managed events carry name@version.
Every native crash, for the lifetime of the process, arrives with no release, so it isn't attributed to any release.
Expected
sentry-native is initialised with the same release that managed events use.
Notes
The fix should be limited to the Native path; resolving the release earlier for every platform isn't safe.
Android and Cocoa set options.Release ??= GetDefaultReleaseString() during their own init (Android, Cocoa).
This is fixed on version7 by #5671, which shipped in 7.0.0-rc.2. sentry-native now gets its release from ScopeDefaults, so on Native AOT it falls back to the entry assembly's name@version, the same release managed events get.
I checked it with a Native AOT console app on macOS that sets no release: with 6.12.1 the native crash arrives without a release, and with 7.0.0-rc.2 it arrives with [email protected], like the managed events.
We won't fix this on 6.x. Until 7.0.0 is out, setting SentryOptions.Release or SENTRY_RELEASE works around it.
Activity
linear-code commentedon Sep 30, 2026
NET-834
ric-oliv commentedon Oct 21, 2026
This is fixed on
version7by #5671, which shipped in 7.0.0-rc.2. sentry-native now gets its release fromScopeDefaults, so on Native AOT it falls back to the entry assembly'sname@version, the same release managed events get.I checked it with a Native AOT console app on macOS that sets no release: with 6.12.1 the native crash arrives without a release, and with 7.0.0-rc.2 it arrives with
[email protected], like the managed events.We won't fix this on 6.x. Until 7.0.0 is out, setting
SentryOptions.ReleaseorSENTRY_RELEASEworks around it.Closing as fixed in 7.0.0.