From 3b12595cd9bcbe0302a422128e7ddf0ea7b2a072 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 2 Apr 2026 18:24:38 +0000 Subject: [PATCH 1/3] Add note about SQLite compile-time options differences to spatial docs Agent-Logs-Url: https://github.com/dotnet/EntityFramework.Docs/sessions/0cbb646c-c532-479e-92b1-566ebc8175da Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com> --- entity-framework/core/providers/sqlite/spatial.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/entity-framework/core/providers/sqlite/spatial.md b/entity-framework/core/providers/sqlite/spatial.md index 890bdf8da1..56fa0c9092 100644 --- a/entity-framework/core/providers/sqlite/spatial.md +++ b/entity-framework/core/providers/sqlite/spatial.md @@ -53,6 +53,9 @@ On **macOS**, you'll also need to set an environment variable before running you DYLD_LIBRARY_PATH="$(brew --prefix sqlite)/lib" ``` +> [!NOTE] +> The system-installed SQLite library may have different [compile-time options](https://sqlite.org/compile.html) than the bundled version provided by `SQLitePCLRaw.bundle_e_sqlite3`. This can affect the availability of features such as math functions and full-text search. Verify that the features your application relies on work as expected with the system SQLite. + ## Configuring SRID In SpatiaLite, columns need to specify an SRID per column. The default SRID is `0`. Specify a different SRID using the HasSrid method. From 5bf26daf8b24298316bd00ee22303668768ebfd4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 2 Apr 2026 18:34:49 +0000 Subject: [PATCH 2/3] Merge compile-time options note into the IMPORTANT block Agent-Logs-Url: https://github.com/dotnet/EntityFramework.Docs/sessions/abc1b896-bfcb-4a24-9790-c9c8f88e222f Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com> --- entity-framework/core/providers/sqlite/spatial.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/entity-framework/core/providers/sqlite/spatial.md b/entity-framework/core/providers/sqlite/spatial.md index 56fa0c9092..9b0b665b3c 100644 --- a/entity-framework/core/providers/sqlite/spatial.md +++ b/entity-framework/core/providers/sqlite/spatial.md @@ -25,6 +25,8 @@ Unfortunately, newer versions of PROJ (a dependency of SpatiaLite) are incompati > [!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. +> +> 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. Verify that the features your application relies on work as expected with the system SQLite. Replace `Microsoft.EntityFrameworkCore.Sqlite` with `Microsoft.EntityFrameworkCore.Sqlite.Core` and reference the `SQLitePCLRaw.provider.sqlite3` package to use the system SQLite library: @@ -53,9 +55,6 @@ On **macOS**, you'll also need to set an environment variable before running you DYLD_LIBRARY_PATH="$(brew --prefix sqlite)/lib" ``` -> [!NOTE] -> The system-installed SQLite library may have different [compile-time options](https://sqlite.org/compile.html) than the bundled version provided by `SQLitePCLRaw.bundle_e_sqlite3`. This can affect the availability of features such as math functions and full-text search. Verify that the features your application relies on work as expected with the system SQLite. - ## Configuring SRID In SpatiaLite, columns need to specify an SRID per column. The default SRID is `0`. Specify a different SRID using the HasSrid method. From e8d6ee248b63681d1480851553390610e9288fcd Mon Sep 17 00:00:00 2001 From: Andriy Svyryd Date: Thu, 2 Apr 2026 13:18:16 -0700 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- entity-framework/core/providers/sqlite/spatial.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entity-framework/core/providers/sqlite/spatial.md b/entity-framework/core/providers/sqlite/spatial.md index 9b0b665b3c..943134068f 100644 --- a/entity-framework/core/providers/sqlite/spatial.md +++ b/entity-framework/core/providers/sqlite/spatial.md @@ -24,9 +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. Verify that the features your application relies on work as expected with the system SQLite. +> 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: