dotnet / dotnet/sdk

Analyzer for redundant NuGet packages

Open
#44,533 5 comments 2 reactions 0 assignees View on GitHub
Area-NetSDK msbuild-analyzer-candidate untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

SDK has been moving some NuGet references in the box, such as Microsoft.NetFramework.ReferenceAssemblies or Microsoft.SourceLink.AzureRepos.Git (etc)

If a codebase has an explicit package reference to, say, Microsoft.SourceLink.AzureRepos.Git 1.0.0, it will inherit an older version, that has this bug: https://github.com/dotnet/sdk/issues/37027

Would be nice to have an analyzer that detects this and suggests to remove an explicit reference, so that the built-in version takes precedence (that no longer has this bug)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing how the SDK handles NuGet references supplied in the box, then read the linked SDK issue 37027. Use the Microsoft.SourceLink.AzureRepos.Git 1.0.0 example to define which explicit references should be detected and what removal suggestion should be shown. Done means the analyzer identifies redundant references and recommends removing them so the built-in version takes precedence.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.