Skip to content

fix: remove redundant NU1510 PackageReference pins in TodoApp.Uno#558

Merged
adrianhall merged 1 commit into
CommunityToolkit:mainfrom
adrianhall:issues/540
Jul 11, 2026
Merged

fix: remove redundant NU1510 PackageReference pins in TodoApp.Uno#558
adrianhall merged 1 commit into
CommunityToolkit:mainfrom
adrianhall:issues/540

Conversation

@adrianhall

Copy link
Copy Markdown
Collaborator

Summary

samples/todoapp/TodoApp.Uno restore emitted three NU1510 warnings on every head (desktop, browserwasm, windows, android, ios-maccatalyst):

warning NU1510: PackageReference System.Formats.Asn1 will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary.
warning NU1510: PackageReference System.Private.Uri will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary.
warning NU1510: PackageReference System.Text.Json will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary.

System.Formats.Asn1, System.Private.Uri, and System.Text.Json were pinned as top-level PackageReference/PackageVersion entries since the Uno sample was first added. NuGet's package-pruning feature now considers these pins redundant on every head — the implicitly-resolved versions already satisfy the pins.

Change

Removed the three redundant entries from:

  • samples/todoapp/TodoApp.Uno/Directory.Packages.props
  • samples/todoapp/TodoApp.Uno/TodoApp.Uno/TodoApp.Uno.csproj

System.IO.Packaging (never triggered NU1510) and SQLitePCLRaw.bundle_e_sqlite3 (genuine NU1903 CVE floor, see #492) are left untouched, per the issue's guidance.

Note: contrary to the issue's guess, these pins predate the #492/#498-era NU1903 fixes — they were part of the original Uno sample scaffold (commit 9b9f9ec, Feb 2025) — but the fix (removal) is the same either way.

Verification

  • Local: dotnet restore + dotnet build -f net10.0-desktop on TodoApp.Uno.csproj — 0 NU1510 warnings (previously 3), build succeeded, only a pre-existing unrelated Uno0001 warning remained.
  • Local: dotnet restore/dotnet build on Datasync.Toolkit.sln (root) — 0 warnings, 0 errors (the Uno sample isn't referenced by the main solution).
  • CI: dispatched the Build Samples workflow on the branch (https://github.com/adrianhall/CommunityToolkit-Datasync/actions/runs/29146039469) — all jobs succeeded, including all 5 todoapp-uno heads (android, ios-maccatalyst, windows, desktop, browserwasm). Confirmed 0 NU1510 occurrences in every job log (previously 3 each).

Fixes #540

System.Formats.Asn1, System.Private.Uri, and System.Text.Json were pinned
as top-level PackageReference/PackageVersion entries since the Uno sample
was first added, but NuGet's package-pruning feature now considers these
pins redundant on every head (desktop, browserwasm, windows, android,
ios-maccatalyst) - the implicitly-resolved versions already satisfy the
pins, so restore emits NU1510 for each.

Removed the three redundant entries from Directory.Packages.props and
TodoApp.Uno.csproj. System.IO.Packaging (never triggers NU1510) and
SQLitePCLRaw.bundle_e_sqlite3 (genuine NU1903 CVE floor, see CommunityToolkit#492) are
left untouched.

Verified: dotnet restore/build -f net10.0-desktop now completes with no
NU1510 warnings (previously 3) and no new warnings/errors. Other heads
(android/ios-maccatalyst/browserwasm/windows) require Uno workloads not
available locally; verification for those relies on the todoapp-uno CI
matrix.

Fixes CommunityToolkit#540
@adrianhall adrianhall merged commit 657dfdf into CommunityToolkit:main Jul 11, 2026
20 checks passed
@adrianhall adrianhall deleted the issues/540 branch July 11, 2026 08:37
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.

TodoApp.Uno: redundant NU1510 PackageReference pins no longer needed for pruning

1 participant