From 13850947bfa8924f22d92791b0d310e8feb930c5 Mon Sep 17 00:00:00 2001 From: ahall Date: Sat, 11 Jul 2026 09:30:27 +0100 Subject: [PATCH] fix: remove unused SQLite native asset warning in TodoApp.BlazorWasm.Client CommunityToolkit.Datasync.Client depends unconditionally on Microsoft.EntityFrameworkCore.Sqlite, which transitively adds a browser-wasm NativeFileReference for SourceGear.sqlite3's e_sqlite3.a via SQLitePCLRaw.bundle_e_sqlite3 (pinned in this project only to resolve NU1903, see #492). This client never uses SQLite/ OfflineDbContext (verified: no references to DbContext, Sqlite, or OfflineTable anywhere in the project), so the native asset is dead weight and trips a benign, code-less warning from the SDK's WorkloadManifest.targets: warning : @(NativeFileReference) is not empty, but the native references won't be linked in, because neither $(WasmBuildNative), nor $(RunAOTCompilation) are 'true'. Root cause traced to SourceGear.sqlite3's buildTransitive targets, which unconditionally add the native asset whenever $(RuntimeIdentifier) == 'browser-wasm', independent of which SQLitePCLRaw.bundle_e_sqlite3 version resolves. Since the warning has no diagnostic code it can't be suppressed via NoWarn, so instead remove the specific unused NativeFileReference item before the SDK's _CheckBrowserWorkloadNeededButNotAvailable target runs. Verified locally (dotnet restore + build samples/todoapp-blazor-wasm/TodoApp.BlazorWasm.sln, matching build-samples-todoapp-blazor-wasm.yml): warning present twice in a clean build before this change, zero occurrences after, with an otherwise identical Debug build (0 Warning(s), 0 Error(s)). Also verified the root Datasync.Toolkit.sln still restores/builds clean and CommunityToolkit.Datasync.Client.Test passes 1432/1432 (unaffected by this samples-only change, but confirms no regression). Fixes #523 --- .../TodoApp.BlazorWasm.Client.csproj | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/samples/todoapp-blazor-wasm/TodoApp.BlazorWasm.Client/TodoApp.BlazorWasm.Client.csproj b/samples/todoapp-blazor-wasm/TodoApp.BlazorWasm.Client/TodoApp.BlazorWasm.Client.csproj index 16e6e87..2380681 100644 --- a/samples/todoapp-blazor-wasm/TodoApp.BlazorWasm.Client/TodoApp.BlazorWasm.Client.csproj +++ b/samples/todoapp-blazor-wasm/TodoApp.BlazorWasm.Client/TodoApp.BlazorWasm.Client.csproj @@ -19,4 +19,18 @@ + + + + + + +