Repository navigation
Enable source linking - #3331
Conversation
There was a problem hiding this comment.
Pull request overview
Enables SourceLink-style debugging support by centralizing PDB/debug settings and adding packaging metadata so NuGet consumers can download source/symbols while debugging.
Changes:
- Removed per-project
<DebugType>portable</DebugType>overrides from several.csprojfiles and centralized it inDirectory.Build.props. - Added package metadata/settings intended for SourceLink and symbol packages (
PublishRepositoryUrl,IncludeSymbols,SymbolPackageFormat,ContinuousIntegrationBuild). - Updated the NuGet release workflow to use
dotnet nuget pushwith--skip-duplicate.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| Samples/Mapsui.Samples.Common/Mapsui.Samples.Common.csproj | Removes project-level DebugType override to rely on centralized props. |
| Mapsui/Mapsui.csproj | Removes project-level DebugType override to rely on centralized props. |
| Mapsui.Rendering.Skia/Mapsui.Rendering.Skia.csproj | Removes project-level DebugType override to rely on centralized props. |
| Mapsui.Experimental.Rendering.Skia/Mapsui.Experimental.Rendering.Skia.csproj | Removes project-level DebugType override to rely on centralized props. |
| Directory.Build.props | Adds SourceLink/symbol packaging properties and centralizes DebugType setting. |
| .github/workflows/dotnet-release-nugets.yml | Switches publishing to dotnet nuget push and skips duplicates. |
a709b22 to
4e14de5
Compare
4e14de5 to
882193a
Compare
pauldendulk
left a comment
There was a problem hiding this comment.
Great, thanks for fixing this old open issue!
Here is the copilot review:
Summary
Three things in one PR:
- Adds SourceLink + symbol package properties to Directory.Build.props
- Consolidates
<DebugType>portable</DebugType>from 4 individual.csprojfiles into the shared Directory.Build.props - Switches CI NuGet push from the legacy
nuget push(NuGet CLI) todotnet nuget push(.NET CLI) - Bonus: fixes inconsistent tab/space indentation in Directory.Build.props
Assessment
The change is correct and mergeable. Here are the specifics:
Directory.Build.props — source linking setup ✅
The four new properties are exactly right for modern .NET SDK (8+):
PublishRepositoryUrl— embeds the repo URL in PDB/nupkg metadataIncludeSymbols+SymbolPackageFormat=snupkg— generates.snupkgsymbol packagesContinuousIntegrationBuild Condition="'$(CI)' == 'true'"— enables deterministic builds on CI, which SourceLink requires for correct path embedding
The Copilot bot comment saying Microsoft.SourceLink.GitHub is needed is wrong for .NET 8+. SourceLink is built into the SDK and these properties are sufficient. @hymccord's rebuttal is correct.
CI workflow (dotnet-release-nugets.yml) ✅ with one note
Switching to dotnet nuget push is consistent with the rest of the repo tooling. The dotnet nuget push command automatically pushes .snupkg files alongside .nupkg (there's a --no-symbols flag to suppress it), so Copilot's concern there is also unfounded — @hymccord's explanation is correct.
One minor point: the uses: NuGet/setup-nuget@v2 step earlier in the workflow is now unused (the nuget CLI is no longer called). Worth removing in this PR or a follow-up to avoid silently downloading unnecessary tooling.
DebugType consolidation ✅
Clean DRY improvement — the <DebugType>portable</DebugType> was duplicated in 4 project files and now lives in one place.
Minor nit
The existing Directory.Build.props uses True (capital) for GenerateDocumentationFile. The new IncludeSymbols uses lowercase true. Functionally identical for MSBuild, but inconsistent. Not a blocker.
Verdict
Approve. The PR does what it says, the approach is correct for modern .NET SDK, and the Copilot bot's two blocking comments are both wrong. The only actionable suggestion is removing the now-unused NuGet/setup-nuget@v2 step from the workflow, which can be done here or in a follow-up.


This will allow the automatic downloading of source code and symbols when debugging.
Closes: #1475