From dcff3613733619ae98cfd197e5fb9d18566c2dd5 Mon Sep 17 00:00:00 2001 From: Philippe Matray Date: Thu, 3 Sep 2026 13:48:44 +0200 Subject: [PATCH] Build: stop packing an empty symbol package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DotNet.ReproducibleBuilds sets DebugType=embedded, so the portable PDB lives inside the assembly and no separate .pdb is ever emitted. `IncludeSymbols` + `SymbolPackageFormat=snupkg` have therefore been packing a shell containing nothing but a nuspec: the shipped FastComponents.1.0.0.snupkg is 3.5 KB across 4 files, not one of them a .pdb. It never broke a release only by accident. The artifact step uploads `*.nupkg`, and that pattern does not match `.snupkg`, so the empty symbol package never left the create_nuget runner. Anyone "fixing" that filter to carry symbols along would turn a silent no-op into a failed publish — nuget.org answers 400 "The package does not contain any symbol (.pdb) files" to an empty snupkg. That is exactly what happened on Atypical-Consulting/PlayBlazor, which inherited this configuration. Removes both properties rather than forcing DebugType=portable to feed a symbol server: embedded means consumers get symbols and Source Link with no symbol-server setup at all. Nothing is lost from what is already published — FastComponents.1.0.0's assembly carries its embedded PDB (MPDB blob verified in the pushed package). Verified: a Release build of src/FastComponents now produces the .nupkg alone. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01D7hy3BpcmrBsEfqE9uGrNp --- .github/workflows/main.yml | 6 +++++- Directory.Build.props | 12 ++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 67cc803..ac04c53 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -73,7 +73,11 @@ jobs: - name: Create NuGet package run: dotnet pack --configuration Release --no-build --output ${{ env.NuGetDirectory }} - # Publish the NuGet package as an artifact, so they can be used in the following jobs + # Publish the NuGet package as an artifact, so they can be used in the following jobs. + # Only .nupkg: symbols are embedded in the assembly (see Directory.Build.props), so no symbol + # package is produced. Were one ever added, it would have to be listed here too - `dotnet + # nuget push` only forwards a .snupkg that sits NEXT TO the .nupkg, and `*.nupkg` does not + # match `.snupkg`. - uses: actions/upload-artifact@v7 with: name: nuget diff --git a/Directory.Build.props b/Directory.Build.props index a30e230..1b74c7c 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -41,11 +41,19 @@ + true true - true - snupkg