Skip to content

Modify SbrpUsageReport to warn instead of fail on errors - #4769

Merged
MichaelSimons merged 1 commit into
dotnet:mainfrom
MichaelSimons:SbrpUsageReport-warnonfailure
Feb 11, 2026
Merged

MichaelSimons merged 1 commit into
dotnet:mainfrom
MichaelSimons:SbrpUsageReport-warnonfailure

Conversation

@MichaelSimons

Copy link
Copy Markdown
Member

Some recent nuget changes caused the SBRP usage report logic to fail. This PR does two things:

  • Modified the SbrpUsageReport to warn instead of fail on errors
  • Capture any project.assets.json paths that may fail to parse in the diagnostic output.

Copilot AI review requested due to automatic review settings February 10, 2026 18:15
@MichaelSimons
MichaelSimons requested review from a team as code owners February 10, 2026 18:15
@MichaelSimons
MichaelSimons removed the request for review from a team February 10, 2026 18:15

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 updates the source-only build’s SBRP usage reporting so that failures in generating the report do not fail the overall build, addressing recent NuGet/lockfile behavior changes that caused the report task to fail.

Changes:

  • Wrap WriteSbrpUsageReport.Execute() in error handling and add per-assets-file exception handling.
  • Introduce an SBRP001 code intended for diagnostic reporting and configure the calling MSBuild target to continue on failure.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
eng/tools/tasks/Microsoft.DotNet.UnifiedBuild.Tasks/WriteSbrpUsageReport.cs Adds exception handling and introduces an SBRP001-coded logging helper for report generation/scan failures.
eng/finish-source-only.proj Runs WriteSbrpUsageReport with ContinueOnError="WarnAndContinue" and attempts to ensure SBRP001 doesn’t fail the build.

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

Comment thread eng/finish-source-only.proj Resolved
@MichaelSimons
MichaelSimons merged commit 9f401f9 into dotnet:main Feb 11, 2026
16 of 17 checks passed
@MichaelSimons
MichaelSimons deleted the SbrpUsageReport-warnonfailure branch February 11, 2026 17:05
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