I recently learned that this is no longer nessary and prevents additional changes like this https://github.com/StackExchange/StackExchange.Redis/pull/3210/changes I'm not sure about netstandard 2.x users and if the sdk handles this. I would think so??
The following is a recent commit message (FoundatioFx/Foundatio@2b7ec90)
Source Link has shipped inside the .NET SDK since 8.0.100 and is enabled by default for repos hosted on GitHub, Azure Repos, GitLab, and Bitbucket. Since every build here uses the .NET 10 SDK (global.json pins 10.0.100 with rollForward latestMajor), the explicit PackageReference is redundant regardless of the target frameworks we multi-target.
Worse, on .NET 8+ SDKs the explicit reference is actively harmful: restoring the package sets PkgMicrosoft_SourceLink_Common, which flips SuppressImplicitGitSourceLink to true and suppresses the SDK's own Source Link imports (dotnet/sourcelink#1652). The build still succeeds with no warning, so this silently degrades Source Link instead of enabling it.
Removing the reference hands Source Link back to the SDK, which keeps it in lockstep with the SDK version and drops a restore-time dependency. The properties Source Link relies on are unchanged: PublishRepositoryUrl, EmbedUntrackedSources, DebugType=embedded, and ContinuousIntegrationBuild on CI. Verified by rebuild: Foundatio.sourcelink.json is still generated and maps sources to raw.githubusercontent.com at the built commit.
Ref: https://github.com/dotnet/sourcelink#using-source-link-in-net-projects
I recently learned that this is no longer nessary and prevents additional changes like this https://github.com/StackExchange/StackExchange.Redis/pull/3210/changes I'm not sure about netstandard 2.x users and if the sdk handles this. I would think so??
The following is a recent commit message (FoundatioFx/Foundatio@2b7ec90)