Skip to content

Drop explicit Microsoft.SourceLink.GitHub reference - #3222

Merged
mgravell merged 1 commit into
mainfrom
marc/3218-drop-sourcelink
Sep 15, 2026
Merged

mgravell merged 1 commit into
mainfrom
marc/3218-drop-sourcelink

Conversation

@mgravell

Copy link
Copy Markdown
Collaborator

Summary

Test plan

  • dotnet build Build.csproj -c Release /p:CI=true - 0 warnings, 0 errors, all TFMs
  • Confirmed *.sourcelink.json is still generated correctly (mapping to the built commit) for both StackExchange.Redis and RESPite across every target framework, including net461/netstandard2.0
  • dotnet pack on StackExchange.Redis - confirmed the packed nuspec still carries the correct <repository> element with commit metadata

Closes #3218

The .NET SDK has included and enabled Source Link for GitHub-hosted
repos by default since 8.0.100; our pinned SDK is well past that.
Referencing the package explicitly overrides the SDK's own version
with ours, which is why we had to hand-bump it for a CVE in
Microsoft.Build.Tasks.Git (#3210) - a class of maintenance the SDK
now handles for us if we get out of its way.

Verified the generated *.sourcelink.json and the packed nuspec
<repository> element are unchanged across all six TFMs.

Closes #3218
@mgravell
mgravell merged commit a8da2bc into main Sep 15, 2026
3 of 4 checks passed
@mgravell
mgravell deleted the marc/3218-drop-sourcelink branch September 15, 2026 13:49
mgravell added a commit to protobuf-net/protobuf-net that referenced this pull request Sep 16, 2026
The SDK has included Source Link by default since 8.0.100, so an
explicit reference only overrides the SDK's version with a hand-managed
one — a standing maintenance cost, and somewhere a transitive advisory
has to be chased by hand.

Verified rather than assumed, since this repo is multi-TFM: building
`protobuf-net.Core` with and without produces a **byte-identical
`*.sourcelink.json` on all four target frameworks** — `net462`,
`netstandard2.0`, `netstandard2.1`, `net8.0` — and the same nuspec
`<repository>` element, commit and all.

Following
[StackExchange.Redis#3222](StackExchange/StackExchange.Redis#3222).
The same change is open as protobuf-net.Grpc#398 and is already in
protobuf-net.Connect's 1.0 branch.
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.

Drop SourceLink package from project

1 participant