Skip to content

Publish symbol packages#50

Merged
chris-peterson merged 1 commit intomainfrom
sourcelink
Feb 21, 2026
Merged

Publish symbol packages#50
chris-peterson merged 1 commit intomainfrom
sourcelink

Conversation

@chris-peterson
Copy link
Copy Markdown
Owner

@chris-peterson chris-peterson commented Feb 21, 2026

Summary

  • Add Source Link and symbol package (.snupkg) support for all NuGet packages
  • Symbols are published to the nuget.org symbol server, enabling step-into debugging for consumers
  • Remove redundant <DebugType>portable</DebugType> from csproj files (already the default)

How it works

As of .NET SDK 8, Source Link is built into the SDK — no package reference needed. The SDK automatically embeds source control metadata in PDBs, mapping source files to the exact GitHub commit.

The new Directory.Build.props configures:

  • PublishRepositoryUrl — publishes the repo URL in NuGet package metadata (must be explicitly opted-in)
  • IncludeSymbols / SymbolPackageFormat=snupkg — generates separate symbol packages (recommended over embedded PDBs to avoid ~30% package size bloat)
  • ContinuousIntegrationBuild — normalizes file paths in PDBs on CI so they work across machines

What consumers get

Debugger (VS/Rider) automatically downloads PDBs from the nuget.org symbol server, then Source Link fetches the matching source from GitHub on demand.

References

Test plan

  • Verify snupkg files are generated alongside nupkg during build
  • Verify publish workflow pushes both nupkg and snupkg to nuget.org
  • Revert sourcelink branch trigger from publish.yml before merge

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