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

Aperta
#6,004 1 commento 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp, macos
Ambito
build-system

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

.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?
Lingua principale
C#
Stelle
775
Fork
262
Merge medio
1g 16h
PR unite (30g)
118

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di getsentry/sentry-dotnet

Tutte le issue di getsentry/sentry-dotnet

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.