From 6c4d608db577e19fdf187b76626863f34cd9681e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 26 Mar 2026 18:18:55 +0000 Subject: [PATCH 1/4] Restore sqlite3mc test project based on SQLite3MC.PCLRaw.bundle Add Microsoft.Data.Sqlite.sqlite3mc.Tests.csproj using the SQLite3MC.PCLRaw.bundle package (replacement for the deprecated SQLitePCLRaw.bundle_e_sqlite3mc). Update conditional compilation directives, InternalsVisibleTo, solution files, and package versions. Agent-Logs-Url: https://github.com/dotnet/efcore/sessions/3d1bd0d1-7e29-42d2-b610-3df859ae04d7 Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com> --- EFCore.slnx | 1 + Microsoft.Data.Sqlite.slnf | 3 +-- eng/Versions.props | 1 + .../Properties/InternalsVisibleTo.cs | 2 ++ test/Directory.Packages.props | 1 + ...Microsoft.Data.Sqlite.sqlite3mc.Tests.csproj | 17 +++++++++++++++++ .../SqliteConnectionTest.cs | 6 +++--- .../TestUtilities/SqliteTestFramework.cs | 2 ++ 8 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 test/Microsoft.Data.Sqlite.Tests/Microsoft.Data.Sqlite.sqlite3mc.Tests.csproj diff --git a/EFCore.slnx b/EFCore.slnx index 791bb2a9057..2b42e28a023 100644 --- a/EFCore.slnx +++ b/EFCore.slnx @@ -76,6 +76,7 @@ + diff --git a/Microsoft.Data.Sqlite.slnf b/Microsoft.Data.Sqlite.slnf index 71fd0720ad9..e34c1a88750 100644 --- a/Microsoft.Data.Sqlite.slnf +++ b/Microsoft.Data.Sqlite.slnf @@ -5,9 +5,8 @@ "src\\Microsoft.Data.Sqlite.Core\\Microsoft.Data.Sqlite.Core.csproj", "src\\Microsoft.Data.Sqlite\\Microsoft.Data.Sqlite.csproj", "test\\Microsoft.Data.Sqlite.Tests\\Microsoft.Data.Sqlite.Tests.csproj", - "test\\Microsoft.Data.Sqlite.Tests\\Microsoft.Data.Sqlite.e_sqlcipher.Tests.csproj", - "test\\Microsoft.Data.Sqlite.Tests\\Microsoft.Data.Sqlite.e_sqlite3mc.Tests.csproj", "test\\Microsoft.Data.Sqlite.Tests\\Microsoft.Data.Sqlite.sqlite3.Tests.csproj", + "test\\Microsoft.Data.Sqlite.Tests\\Microsoft.Data.Sqlite.sqlite3mc.Tests.csproj", "test\\Microsoft.Data.Sqlite.Tests\\Microsoft.Data.Sqlite.winsqlite3.Tests.csproj" ] } diff --git a/eng/Versions.props b/eng/Versions.props index 088f55cedde..e8e21e7840d 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -42,6 +42,7 @@ 1.3.2 1.12.0 3.0.2 + 2.3.2 diff --git a/src/Microsoft.Data.Sqlite.Core/Properties/InternalsVisibleTo.cs b/src/Microsoft.Data.Sqlite.Core/Properties/InternalsVisibleTo.cs index 32860f4dacd..e284f6dfcfd 100644 --- a/src/Microsoft.Data.Sqlite.Core/Properties/InternalsVisibleTo.cs +++ b/src/Microsoft.Data.Sqlite.Core/Properties/InternalsVisibleTo.cs @@ -5,6 +5,8 @@ [assembly: InternalsVisibleTo( "Microsoft.Data.Sqlite.sqlite3.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo( + "Microsoft.Data.Sqlite.sqlite3mc.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo( "Microsoft.Data.Sqlite.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo( diff --git a/test/Directory.Packages.props b/test/Directory.Packages.props index 2dcd2f6da76..54185d2e539 100644 --- a/test/Directory.Packages.props +++ b/test/Directory.Packages.props @@ -16,6 +16,7 @@ + diff --git a/test/Microsoft.Data.Sqlite.Tests/Microsoft.Data.Sqlite.sqlite3mc.Tests.csproj b/test/Microsoft.Data.Sqlite.Tests/Microsoft.Data.Sqlite.sqlite3mc.Tests.csproj new file mode 100644 index 00000000000..bb6cceac9a0 --- /dev/null +++ b/test/Microsoft.Data.Sqlite.Tests/Microsoft.Data.Sqlite.sqlite3mc.Tests.csproj @@ -0,0 +1,17 @@ + + + + $(DefaultNetCoreTargetFramework);$(NetFrameworkCurrent) + $(DefineConstants);SQLITE3MC + enable + + + + + + + + + + + diff --git a/test/Microsoft.Data.Sqlite.Tests/SqliteConnectionTest.cs b/test/Microsoft.Data.Sqlite.Tests/SqliteConnectionTest.cs index e635608043b..ba33737c81b 100644 --- a/test/Microsoft.Data.Sqlite.Tests/SqliteConnectionTest.cs +++ b/test/Microsoft.Data.Sqlite.Tests/SqliteConnectionTest.cs @@ -266,7 +266,7 @@ public void Open_works_when_password() { #if E_SQLITE3 || WINSQLITE3 Open_works_when_password_unsupported(); -#elif E_SQLCIPHER || E_SQLITE3MC || SQLCIPHER +#elif E_SQLCIPHER || E_SQLITE3MC || SQLCIPHER || SQLITE3MC Open_works_when_password_supported(); #elif SQLITE3 Open_works_when_password_might_be_supported(); @@ -313,7 +313,7 @@ private void Open_works_when_password_might_be_supported() connection.Open(); } -#if E_SQLCIPHER || E_SQLITE3MC || SQLCIPHER +#if E_SQLCIPHER || E_SQLITE3MC || SQLCIPHER || SQLITE3MC [Fact] public void Open_decrypts_lazily_when_no_password() { @@ -1287,7 +1287,7 @@ public void Open_releases_handle_when_constructor_fails() var ex = Assert.Throws(connection.Open); Assert.Equal(Resources.EncryptionNotSupported(GetNativeLibraryName()), ex.Message); Assert.Equal(ConnectionState.Closed, connection.State); -#elif E_SQLCIPHER || E_SQLITE3MC || SQLCIPHER +#elif E_SQLCIPHER || E_SQLITE3MC || SQLCIPHER || SQLITE3MC var ex = Assert.Throws(connection.Open); Assert.Equal(SQLITE_NOTADB, ex.SqliteErrorCode); Assert.Equal(ConnectionState.Closed, connection.State); diff --git a/test/Microsoft.Data.Sqlite.Tests/TestUtilities/SqliteTestFramework.cs b/test/Microsoft.Data.Sqlite.Tests/TestUtilities/SqliteTestFramework.cs index 3e96034be5c..2e2fde52814 100644 --- a/test/Microsoft.Data.Sqlite.Tests/TestUtilities/SqliteTestFramework.cs +++ b/test/Microsoft.Data.Sqlite.Tests/TestUtilities/SqliteTestFramework.cs @@ -20,6 +20,8 @@ "Microsoft.Data.Sqlite.winsqlite3.Tests")] #elif SQLITE3 "Microsoft.Data.Sqlite.sqlite3.Tests")] +#elif SQLITE3MC + "Microsoft.Data.Sqlite.sqlite3mc.Tests")] #else #error Unexpected native library #endif From 4edfba9f3bf3db278aa1539b8dfa805edf10aad9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 26 Mar 2026 18:25:40 +0000 Subject: [PATCH 2/4] Replace E_SQLITE3MC with SQLITE3MC in SqliteConnectionTest.cs Agent-Logs-Url: https://github.com/dotnet/efcore/sessions/387b831e-9fb8-40e5-9371-469b87dd874b Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com> --- test/Microsoft.Data.Sqlite.Tests/SqliteConnectionTest.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/Microsoft.Data.Sqlite.Tests/SqliteConnectionTest.cs b/test/Microsoft.Data.Sqlite.Tests/SqliteConnectionTest.cs index ba33737c81b..687729874f5 100644 --- a/test/Microsoft.Data.Sqlite.Tests/SqliteConnectionTest.cs +++ b/test/Microsoft.Data.Sqlite.Tests/SqliteConnectionTest.cs @@ -266,7 +266,7 @@ public void Open_works_when_password() { #if E_SQLITE3 || WINSQLITE3 Open_works_when_password_unsupported(); -#elif E_SQLCIPHER || E_SQLITE3MC || SQLCIPHER || SQLITE3MC +#elif E_SQLCIPHER || SQLCIPHER || SQLITE3MC Open_works_when_password_supported(); #elif SQLITE3 Open_works_when_password_might_be_supported(); @@ -313,7 +313,7 @@ private void Open_works_when_password_might_be_supported() connection.Open(); } -#if E_SQLCIPHER || E_SQLITE3MC || SQLCIPHER || SQLITE3MC +#if E_SQLCIPHER || SQLCIPHER || SQLITE3MC [Fact] public void Open_decrypts_lazily_when_no_password() { @@ -1287,7 +1287,7 @@ public void Open_releases_handle_when_constructor_fails() var ex = Assert.Throws(connection.Open); Assert.Equal(Resources.EncryptionNotSupported(GetNativeLibraryName()), ex.Message); Assert.Equal(ConnectionState.Closed, connection.State); -#elif E_SQLCIPHER || E_SQLITE3MC || SQLCIPHER || SQLITE3MC +#elif E_SQLCIPHER || SQLCIPHER || SQLITE3MC var ex = Assert.Throws(connection.Open); Assert.Equal(SQLITE_NOTADB, ex.SqliteErrorCode); Assert.Equal(ConnectionState.Closed, connection.State); From 29e8f1a1085325d18244efab29ec6cb1a07c3fac Mon Sep 17 00:00:00 2001 From: Andriy Svyryd Date: Thu, 26 Mar 2026 14:27:08 -0700 Subject: [PATCH 3/4] Update test/Microsoft.Data.Sqlite.Tests/Microsoft.Data.Sqlite.sqlite3mc.Tests.csproj Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../Microsoft.Data.Sqlite.sqlite3mc.Tests.csproj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/Microsoft.Data.Sqlite.Tests/Microsoft.Data.Sqlite.sqlite3mc.Tests.csproj b/test/Microsoft.Data.Sqlite.Tests/Microsoft.Data.Sqlite.sqlite3mc.Tests.csproj index bb6cceac9a0..49acbe62392 100644 --- a/test/Microsoft.Data.Sqlite.Tests/Microsoft.Data.Sqlite.sqlite3mc.Tests.csproj +++ b/test/Microsoft.Data.Sqlite.Tests/Microsoft.Data.Sqlite.sqlite3mc.Tests.csproj @@ -6,6 +6,9 @@ enable + + win-x64 + From ecefdf6858cdbb3644fecde6250b0e448d253408 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 27 Mar 2026 04:11:13 +0000 Subject: [PATCH 4/4] Remove all SQLCIPHER/E_SQLCIPHER references from SqliteConnectionTest.cs Agent-Logs-Url: https://github.com/dotnet/efcore/sessions/61f804ca-6de6-4180-a3b1-bcf3af5f028c Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com> --- test/Microsoft.Data.Sqlite.Tests/SqliteConnectionTest.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/Microsoft.Data.Sqlite.Tests/SqliteConnectionTest.cs b/test/Microsoft.Data.Sqlite.Tests/SqliteConnectionTest.cs index 687729874f5..b4e182af617 100644 --- a/test/Microsoft.Data.Sqlite.Tests/SqliteConnectionTest.cs +++ b/test/Microsoft.Data.Sqlite.Tests/SqliteConnectionTest.cs @@ -266,7 +266,7 @@ public void Open_works_when_password() { #if E_SQLITE3 || WINSQLITE3 Open_works_when_password_unsupported(); -#elif E_SQLCIPHER || SQLCIPHER || SQLITE3MC +#elif SQLITE3MC Open_works_when_password_supported(); #elif SQLITE3 Open_works_when_password_might_be_supported(); @@ -313,7 +313,7 @@ private void Open_works_when_password_might_be_supported() connection.Open(); } -#if E_SQLCIPHER || SQLCIPHER || SQLITE3MC +#if SQLITE3MC [Fact] public void Open_decrypts_lazily_when_no_password() { @@ -1287,7 +1287,7 @@ public void Open_releases_handle_when_constructor_fails() var ex = Assert.Throws(connection.Open); Assert.Equal(Resources.EncryptionNotSupported(GetNativeLibraryName()), ex.Message); Assert.Equal(ConnectionState.Closed, connection.State); -#elif E_SQLCIPHER || SQLCIPHER || SQLITE3MC +#elif SQLITE3MC var ex = Assert.Throws(connection.Open); Assert.Equal(SQLITE_NOTADB, ex.SqliteErrorCode); Assert.Equal(ConnectionState.Closed, connection.State);