Repository navigation
Remove the redundant Microsoft.SourceLink.GitHub package - #2818
Merged
Merged
Conversation
Source Link is part of the .NET SDK since .NET 8, so the package is redundant. Removing it also drops Microsoft.Build.Tasks.Git from the dependency graph, which clears the NU1902 advisory (GHSA-23fw-v26w-5fgq). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
🤖 GitHub commentsJust comment with:
|
flobernd
approved these changes
Oct 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes the
Microsoft.SourceLink.GitHubpackage reference. The .NET SDK includes Source Link since .NET 8, so the package adds nothing, andMicrosoft.Build.Tasks.Gitleaves the dependency graph with it.Prompt summary: Drop the explicit Source Link package from the .NET repositories, because the SDK provides Source Link and the pinned
8.0.0version now fails restore withNU1902(breaking change note).Why
Since .NET 8 the SDK enables Source Link by default for GitHub remotes. The explicit package only keeps a dependency, and its transitive
Microsoft.Build.Tasks.Gitis the package behind theNU1902advisory (GHSA-23fw-v26w-5fgq). Removing the reference ends the whole class of problem instead of chasing patched versions. This repo pins SDK10.0.100.What
Source Link
Directory.Packages.propsandsrc/Directory.Build.propsno longer referenceMicrosoft.SourceLink.GitHub. The SDK still embeds the Source Link mapping in each PDB and writes therepositoryelement with the commit into each nuspec, so debugging into the shipped packages works as before.Verify