Skip to content

Refine NU1510 messaging for explicitly referenced auto-available PackageReference dependencies#7380

Merged
nkolev92 merged 6 commits into
devfrom
copilot/add-quick-fix-affordances-nu1510
May 14, 2026
Merged

Refine NU1510 messaging for explicitly referenced auto-available PackageReference dependencies#7380
nkolev92 merged 6 commits into
devfrom
copilot/add-quick-fix-affordances-nu1510

Conversation

Copilot AI commented May 8, 2026

Copy link
Copy Markdown
Contributor

Bug

Description

Updated the NU1510 warning message for pruned direct PackageReference items to avoid saying the package is "unused". The message now explains that the package is automatically available, should not be referenced explicitly, and gives a clear action to take.

  • Previous wording: "This package is unused and should be removed from your dependencies"
  • Current wording: "This package is automatically available and does not need to be referenced explicitly. Remove the PackageReference item."

The pruning functional test assertion continues to validate the emitted NU1510 message using the shared string resource formatting pattern.

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
  • Added tests
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc.

Copilot AI changed the title [WIP] Improve error message for packages raising NU1510 warnings Strengthen NU1510 messaging for unused PackageReference dependencies May 8, 2026
Copilot AI requested a review from nkolev92 May 8, 2026 23:52
Copilot AI requested a review from nkolev92 May 10, 2026 21:24
@nkolev92 nkolev92 marked this pull request as ready for review May 12, 2026 16:05
@nkolev92 nkolev92 requested a review from a team as a code owner May 12, 2026 16:05
@nkolev92 nkolev92 requested a review from zivkan May 12, 2026 16:05
Comment thread src/NuGet.Core/NuGet.Commands/Strings.resx Outdated

Copilot AI commented May 13, 2026

Copy link
Copy Markdown
Contributor Author

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • data.nuget.org
    • Triggering command: /usr/bin/dotnet dotnet msbuild src/NuGet.Core/NuGet.Commands/NuGet.Commands.csproj /t:UpdateXlf -v:q (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title Strengthen NU1510 messaging for unused PackageReference dependencies Refine NU1510 messaging for explicitly referenced auto-available PackageReference dependencies May 13, 2026
@nkolev92 nkolev92 requested review from jebriede and zivkan May 13, 2026 17:33
Comment thread src/NuGet.Core/NuGet.Commands/Strings.resx
@nkolev92 nkolev92 merged commit c1a1e54 into dev May 14, 2026
17 checks passed
@nkolev92 nkolev92 deleted the copilot/add-quick-fix-affordances-nu1510 branch May 14, 2026 16:29
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.

Add affordances for quick fixing projects with NU1510

3 participants