dotnet / dotnet/sourcelink

Consider emitting a warning when old sourcelink packages are being used in a Microsoft.NET.Sdk project style

Open
#1,739 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.4k
Forks
148
PR merge metrics
No merged PRs in 30d

Description

Referencing an old version of the sourcelink packages will make them win over whatever is inserted into the .NET SDK. The overall ability to reference sourcelink packages out-of-band is good but it shouldn't replace newer implementations that are part of the SDK.

The impact: Customers continue to reference sourcelink packages with old versions and don't benefit from the improvements that went into the product over the last years. They also bloat their restore dependency graph unnecessarily.

Consider emitting a warning when such a case is identified. Ideally this would be part of NuGet Package Pruning which is on since .NET 11 and is extensible. It's driven by an msbuild item list so the sourcelink packages could just be added to it in the Microsoft.NET.Sdk props/targets.

@tmat, cc @dsplaisted @jankratochvilcz

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing how NuGet Package Pruning consumes its MSBuild item list and how the Microsoft.NET.Sdk props/targets identify Source Link packages. Confirm the warning behavior for old out-of-band versions in a Microsoft.NET.Sdk project, including the expected restore dependency graph impact, and verify it with the repository's relevant build or restore tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.