Skip to content

Unable to enable sentry-native for non-AOT projects that include unmanaged C++ code #4806

@BorderKeeper

Description

@BorderKeeper

Package

Sentry

.NET Flavor

.NET

.NET Version

9.0

OS

Windows

OS Version

11

Development Environment

Visual Studio v18.x

SDK Version

6.0.0

Self-Hosted Sentry Version

sentry.stage.platform.jamflabs.com

Workload Versions

Workload version: 10.0.100-manifests.5fb86115

Installed Workload Id Manifest Version Installation Source

Use dotnet workload search to find additional workloads to install.

UseSentry or SentrySdk.Init call

SentrySdk.Init(o =>
{
o.Dsn = "https://6829d42c28db9c7b117a1c0e3ba1f78e@sentry.stage.platform.jamflabs.com/5";
o.Debug = true;
o.DiagnosticLevel = SentryLevel.Debug;
});

Steps to Reproduce

Run SentrySdk.CauseCrash(Sentry.CrashType.Native);

Expected Result

Get a native crash

Actual Result

System complains it's not an AOT build. Why is this restricted to only Native AOT? Crashpad should work just fine with any executable, yet because the C# code itself isn't native I cannot capture crashes caused in unmanaged libraries included inside my C# managed executable. Is this intended behaviour? Am I forced to include sentry-native manually even though it should be tagged along the main C# SDK?

Is there a workaround I can use? Looking at your code you check the IsTrimmed and I don't want to or know how to bypass that check.

Thank you.

Metadata

Metadata

Assignees

Labels

.NETPull requests that update .net codeBugSomething isn't working

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions