Native AOT symbol upload never runs for net10.0-macos apps

Open
#6,004 1 comment 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
csharp, macos
Domain
build-system

Research direction

The upload hook lives in src/Sentry/buildTransitive/Sentry.targets: the upload runs AfterTargets _CopyAotSymbols (around line 183 and 216), which doesn't exist for net10.0-macos, while net11 hooks Publish (around line 191). Start by building with -bl and checking the binlog for the 'does not exist ... will be ignored' warning. Done means a net10.0-macos Native AOT publish logs 'Preparing upload to Sentry' and uploads symbols; the dSYM location still needs confirming.

Written by the indexing model from the issue text.

Description

.NET Bug State: Needs Discussion

A net10.0-macos app with PublishAot=true uploads no debug files during dotnet publish, even with SentryUploadSymbols=true. There's no "Preparing upload to Sentry" message and no warning. I found this while testing #6002.

This is about plain macOS apps (net10.0-macos). Mac Catalyst isn't affected, so neither are MAUI apps. On net11.0-macos, the same app uploads its dSYM from publish/.

What happens

For Native AOT on net8 to net10, Sentry.targets runs the upload after the _CopyAotSymbols target (7.0.1, line 183). That target comes from the Native AOT compiler package, and a macOS app build doesn't have it, so the upload never runs. The binlog has this message:

The target "_CopyAotSymbols" listed in an AfterTargets attribute at ".../buildTransitive/Sentry.targets (216,42)" does not exist in the project, and will be ignored.

On net11 the upload runs after Publish instead (line 191), and that works.

Today this happens when the app is built with -f net10.0-macos. Without -f, a single-target app takes the managed upload path and uploads only managed PDBs, which can't symbolicate Native AOT stack traces. Once #6002 merges, single-target apps upload nothing without -f too.

How to reproduce
  1. Run dotnet new macos -n macapp, set <TargetFramework>net10.0-macos</TargetFramework> and <PublishAot>true</PublishAot>, and add a Sentry package reference.
  2. Run dotnet publish -c Release -f net10.0-macos -p:SentryUploadSymbols=true -p:SentryOrg=my-org -p:SentryProject=my-project -p:SentryAuthToken=$SENTRY_AUTH_TOKEN -bl.
  3. The output has no "Preparing upload to Sentry" line, and the binlog has the message above.

I ran this with the .NET 11.0.100 SDK and the macos workload 27.2.11039 (Microsoft.macOS.Sdk.net10.0_26.0 26.0.11017), with sentry-cli 3.8.2 uploading to a fake Sentry server, using packages built from main and from #6002.

Open questions
  • Does a net10 macOS Native AOT publish produce a dSYM, and where? The net10 macOS pack asks for Xcode 26.0. I only had Xcode 27.2, so I built with ValidateXcodeVersion=false and without the template's asset catalog, and found no dSYM in bin/ or obj/.
  • Does a build for one runtime identifier behave differently from the template's default, which builds for both osx-x64 and osx-arm64?
  • net11 already works. Is net10 worth fixing on its own, given it's supported until November 2028?
Dominant language
C#
Stars
775
Forks
262
Avg merge
1d 16h
Merged PRs (30d)
118

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from getsentry/sentry-dotnet

All issues in getsentry/sentry-dotnet

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.