Repository navigation
[SbrpUsageReport] Fix SBRP detection for packages with versions in their name - #4557
Merged
MichaelSimons merged 2 commits intoFeb 2, 2026
Merged
MichaelSimons merged 2 commits into
MichaelSimons merged 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the SBRP usage reporting task so that package name and version are derived from nuspec metadata instead of parsing the nupkg filename, fixing mis-detection of packages whose IDs contain version-like segments (e.g., microsoft.net.sdk.android.manifest-10.0.100).
Changes:
- Add
GetPackageInfoFromNupkghelper to open each.nupkg, locate its.nuspec, and read<id>and<version>from the nuspec XML. - Update
ReadExternalPackagesto use nuspec-derived name and version instead of a filename regex, avoiding incorrect splitting for manifest/text-only packages. - Introduce
System.IO.Compressionusage to read.nupkgarchives.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Read package name and version from nuspec metadata instead of parsing the nupkg filename. This fixes incorrect detection of manifest packages like microsoft.net.sdk.android.manifest-10.0.100 which have version-like strings in their package name.
MichaelSimons
force-pushed
the
fix-sbrp-manifest-package-detection
branch
from
January 30, 2026 16:56
18d05e2 to
c509cd3
Compare
Co-authored-by: Copilot <[email protected]>
ellahathaway
approved these changes
Jan 31, 2026
ViktorHofer
approved these changes
Jan 31, 2026
MichaelSimons
added a commit
that referenced
this pull request
Feb 10, 2026
…eir name (#4557) Co-authored-by: Copilot <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Read package name and version from nuspec metadata instead of parsing the nupkg filename. This fixes incorrect detection of manifest packages like microsoft.net.sdk.android.manifest-10.0.100 which have version-like strings in their package name.
Before this change, the SbrpUsageReport contained two entries for each of the text-only manifest packages w/the second one being incorrect.
{ "Name": "Microsoft.NET.Sdk.Android.Manifest-10.0.100", "Version": "36.1.2", "Path": "/__w/1/s/src/source-build-reference-packages/src/textOnlyPackages/src/microsoft.net.sdk.android.manifest-10.0.100/36.1.2", "Tfms": null, "Id": "microsoft.net.sdk.android.manifest-10.0.100/36.1.2", "References": { "/__w/1/s/src/sdk/artifacts/obj/redist/project.assets.json": [] } }, { "Name": "Microsoft.NET.Sdk.Android.Manifest-10", "Version": "0.100.36.1.2", "Path": "/__w/1/s/src/source-build-reference-packages/src/externalPackages/src/**/Microsoft.NET.Sdk.Android.Manifest-10/0.100.36.1.2", "Tfms": null, "Id": "microsoft.net.sdk.android.manifest-10/0.100.36.1.2", "References": {} },