Skip to content

Add transitive FrameworkReference guidance to NU1510 docs#3575

Open
Copilot wants to merge 4 commits into
mainfrom
copilot/add-transitive-project-example
Open

Add transitive FrameworkReference guidance to NU1510 docs#3575
Copilot wants to merge 4 commits into
mainfrom
copilot/add-transitive-project-example

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 28, 2026

NU1510 documentation did not cover the case where pruning depends on a framework reference that arrives through a project reference. This left a gap for consumers who need to add the framework reference directly before NuGet can recognize an otherwise unnecessary package reference.

  • Problem clarification

    • Add a transitive-project scenario showing a library that references Microsoft.AspNetCore.App and a consumer that references the library.
    • Explain that the consumer's restore graph does not treat the transitive FrameworkReference as sufficient for pruning guidance.
  • Guidance added

    • Document that the consumer might need to declare the same FrameworkReference directly.
    • Tie that step to the expected NU1510 outcome for the now-unnecessary direct PackageReference.
  • NU1510 example expansion

    • Add a new example to NU1510.md with Library.csproj and Consumer.csproj.
    • Update the solution section to call out the direct FrameworkReference requirement in this scenario.
<ItemGroup>
  <ProjectReference Include="..\Library\Library.csproj" />
  <FrameworkReference Include="Microsoft.AspNetCore.App" />
  <PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.0" />
</ItemGroup>

@learn-build-service-prod
Copy link
Copy Markdown

Learn Build status updates of commit 1e70f84:

✅ Validation status: passed

File Status Preview URL Details
docs/reference/errors-and-warnings/NU1510.md ✅Succeeded View

For more details, please refer to the build report.

@learn-build-service-prod
Copy link
Copy Markdown

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

Comment thread docs/reference/errors-and-warnings/NU1510.md Outdated
Copilot AI requested a review from nkolev92 May 28, 2026 00:10
@learn-build-service-prod
Copy link
Copy Markdown

Learn Build status updates of commit 93775ad:

✅ Validation status: passed

File Status Preview URL Details
docs/reference/errors-and-warnings/NU1510.md ✅Succeeded View

For more details, please refer to the build report.

@learn-build-service-prod
Copy link
Copy Markdown

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@nkolev92 nkolev92 marked this pull request as ready for review May 29, 2026 22:27
@nkolev92 nkolev92 requested review from a team as code owners May 29, 2026 22:27
Copilot AI review requested due to automatic review settings May 29, 2026 22:27
@learn-build-service-prod
Copy link
Copy Markdown

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Copy Markdown

Learn Build status updates of commit 42c65bf:

✅ Validation status: passed

File Status Preview URL Details
docs/reference/errors-and-warnings/NU1510.md ✅Succeeded View

For more details, please refer to the build report.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the NU1510 warning documentation to cover a transitive FrameworkReference scenario where pruning guidance requires the consumer project to declare the framework reference directly.

Changes:

  • Adds ai-usage metadata and updates the document date.
  • Renames the original content to Scenario 1.
  • Adds Scenario 2 with Library.csproj and Consumer.csproj examples for direct FrameworkReference guidance.

Comment thread docs/reference/errors-and-warnings/NU1510.md
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.

3 participants