Commit 5d41412
fix: remove unused SQLite native asset warning in TodoApp.BlazorWasm.Client (#560)
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
Co-authored-by: ahall <ahall@cloudflare.com>1 parent 448c446 commit 5d41412
1 file changed
Lines changed: 14 additions & 0 deletions
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
22 | 36 | | |
0 commit comments