Skip to content

fix(build): skip symbols packages during NuGet publish#268

Merged
ChrisPulman merged 2 commits into
mainfrom
CP_fix-nuget-publish-symbols-duplicates
Jul 11, 2026
Merged

fix(build): skip symbols packages during NuGet publish#268
ChrisPulman merged 2 commits into
mainfrom
CP_fix-nuget-publish-symbols-duplicates

Conversation

@ChrisPulman

@ChrisPulman ChrisPulman commented Jul 11, 2026

Copy link
Copy Markdown
Member

What kind of change does this PR introduce?

CI/release workflow bug fix for NuGet package publishing and release artifact preparation.

What is the new behavior?

Directory.Build.props no longer requests legacy *.symbols.nupkg generation for every package. The release workflow also excludes *.symbols.nupkg from the unsigned and signed NuGet artifacts before the signing job and before release/publish handoff.

The NuGet publish job now receives only primary signed .nupkg packages and still uses --skip-duplicate so reruns continue when a prior attempt already published one or more packages.

What is the current behavior?

The release pack step generated legacy .symbols.nupkg packages because the shared props set IncludeSymbols=true without a shared SymbolPackageFormat. The original signing job downloaded all packages/*.nupkg artifacts and signed every signed/*.nupkg, including legacy symbols packages. The publish job then attempted to push those symbols packages as normal packages, causing NuGet HTTP 409 duplicate ID/version failures after the primary package had already been published.

Checklist

  • Tests have been added or updated (for bug fixes / features)
  • Docs have been added or updated (for bug fixes / features)
  • Changes target the main branch
  • PR title follows Conventional Commits

Additional information

Failed run: https://github.com/reactivemarbles/Extensions.Hosting/actions/runs/29130836781/job/86549119186

Validation:

  • Packed Extensions.Hosting.Avalonia for net8.0 and confirmed only the primary .nupkg was produced.
  • Checked effective MSBuild properties for IncludeSymbols, SymbolPackageFormat, DebugType, and EmbedUntrackedSources.
  • Simulated the publish package selection with primary and symbols packages.
  • Ran git diff --check.

Release workflow:

- Filter signed publish inputs so legacy *.symbols.nupkg artifacts are not pushed to NuGet as primary packages.

- Add --skip-duplicate so reruns after partial publishes continue with remaining packages.

Validation:

- Simulated the publish package selection with primary and symbols packages.

- Ran git diff --check.
Release packaging:

- Remove the shared IncludeSymbols property that caused legacy *.symbols.nupkg packages to be emitted by dotnet pack.

- Exclude legacy symbols packages from unsigned and signed release artifacts before the signing and publishing jobs.

- Simplify the NuGet publish loop now that signed artifacts contain only primary .nupkg files.

Validation:

- Packed Extensions.Hosting.Avalonia for net8.0 and confirmed only the primary .nupkg was produced.

- Checked effective MSBuild properties for IncludeSymbols, SymbolPackageFormat, DebugType, and EmbedUntrackedSources.

- Ran git diff --check.
@ChrisPulman ChrisPulman merged commit 7e90611 into main Jul 11, 2026
1 check passed
@ChrisPulman ChrisPulman deleted the CP_fix-nuget-publish-symbols-duplicates branch July 11, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant