Skip to content

Add targeting pack tracking to SBRP usage report - #3321

Merged
MichaelSimons merged 3 commits into
dotnet:mainfrom
MichaelSimons:targetPacks-sbrpUsageReport
Nov 12, 2025
Merged

MichaelSimons merged 3 commits into
dotnet:mainfrom
MichaelSimons:targetPacks-sbrpUsageReport

Conversation

@MichaelSimons

Copy link
Copy Markdown
Member

The SBRP usage report was not correctly detecting targeting pack references. These changes track them which is important for detecting unreferenced packages that can be removed.

@MichaelSimons
MichaelSimons requested a review from a team as a code owner November 12, 2025 20:16
Copilot AI review requested due to automatic review settings November 12, 2025 20:16
@MichaelSimons
MichaelSimons requested a review from a team as a code owner November 12, 2025 20:16
@MichaelSimons
MichaelSimons removed the request for review from a team November 12, 2025 20:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 enhances the SBRP (Source Build Reference Packages) usage report to track targeting pack references, which previously went undetected. This improvement is critical for identifying unreferenced packages that can be safely removed from the build.

Key Changes:

  • Added framework reference tracking logic that maps framework references (e.g., Microsoft.NETCore.App, Microsoft.AspNetCore.App) to their corresponding targeting packs (e.g., Microsoft.NETCore.App.Ref)
  • Introduced InferTargetingPackVersion() method to derive targeting pack versions from target framework monikers (e.g., net6.0 → 6.0.0)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Matt Thalman <[email protected]>
@dotnet-policy-service
dotnet-policy-service Bot requested review from a team November 12, 2025 20:47
@MichaelSimons
MichaelSimons force-pushed the targetPacks-sbrpUsageReport branch from ecdd4e7 to a62d9a2 Compare November 12, 2025 20:50
@MichaelSimons
MichaelSimons removed request for a team November 12, 2025 20:51
@MichaelSimons
MichaelSimons requested review from mthalman and removed request for a team November 12, 2025 20:51
@MichaelSimons
MichaelSimons enabled auto-merge (squash) November 12, 2025 21:52
@MichaelSimons
MichaelSimons merged commit 414a14c into dotnet:main Nov 12, 2025
@MichaelSimons
MichaelSimons deleted the targetPacks-sbrpUsageReport branch November 12, 2025 23:18
MichaelSimons added a commit that referenced this pull request Feb 10, 2026
Co-authored-by: GitHub Copilot CLI <[email protected]>
Co-authored-by: Matt Thalman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants