From 4c9a95597761323bba5b8c99237b3bc6049b116b Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Fri, 3 Apr 2026 00:07:43 +0300 Subject: [PATCH] Add compile-time options warning to SQLite spatial docs (#5320) Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com> --- entity-framework/core/providers/sqlite/spatial.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/entity-framework/core/providers/sqlite/spatial.md b/entity-framework/core/providers/sqlite/spatial.md index 890bdf8da1..943134068f 100644 --- a/entity-framework/core/providers/sqlite/spatial.md +++ b/entity-framework/core/providers/sqlite/spatial.md @@ -24,7 +24,9 @@ brew install libspatialite Unfortunately, newer versions of PROJ (a dependency of SpatiaLite) are incompatible with EF's default [SQLitePCLRaw bundle](/dotnet/standard/data/sqlite/custom-versions#bundles). You can work around this by using the system SQLite library instead. > [!IMPORTANT] -> Don't use `Microsoft.EntityFrameworkCore.Sqlite` or `Microsoft.Data.Sqlite` with SpatiaLite on macOS and Linux. Both packages pull in `SQLitePCLRaw.bundle_e_sqlite3` by default—a bundled version of SQLite that is incompatible with system-installed Sqlite. Using it may result in a silent crash at run time. Use `Microsoft.EntityFrameworkCore.Sqlite.Core` or `Microsoft.Data.Sqlite.Core` instead, together with the system SQLite provider as shown below. +> Don't use `Microsoft.EntityFrameworkCore.Sqlite` or `Microsoft.Data.Sqlite` with SpatiaLite on macOS and Linux. Both packages pull in `SQLitePCLRaw.bundle_e_sqlite3` by default—a bundled version of SQLite that is incompatible with system-installed SQLite. Using it may result in a silent crash at run time. Use `Microsoft.EntityFrameworkCore.Sqlite.Core` or `Microsoft.Data.Sqlite.Core` instead, together with the system SQLite provider as shown below. +> +> Also note that the system-installed SQLite library may have different [compile-time options](https://sqlite.org/compile.html) than the bundled version. This can affect the availability of features such as math functions and full-text search. To quickly inspect the options in your SQLite build, run `PRAGMA compile_options;` and check for the features your application relies on. Replace `Microsoft.EntityFrameworkCore.Sqlite` with `Microsoft.EntityFrameworkCore.Sqlite.Core` and reference the `SQLitePCLRaw.provider.sqlite3` package to use the system SQLite library: