-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQLCipher with the upcoming EF Core version: 3.0.0 #17910
Comments
With the 2.0 release, the package id for bundle_sqlcipher changed to bundle_e_sqlcipher: https://www.nuget.org/packages/SQLitePCLRaw.bundle_e_sqlcipher/ |
Thank you @ericsink a quick answer I just got to try it. I was using information from SQLitePCL.raw wiki that may be why I didn't know that the bundle ID has changed for v2. Anyway I was still not able to make it work even with the different bundle. I am still getting the same "Not found" exception as described above. Now I found out on the SQLitePCL.raw Release page for 2.0, that Xamarin.Mac is not supported right now which we will need to support in the future anyway so I am stuck with SQLite 2.2.6 for now. From what from what I was able to deduce I think that some weird combination of NuGet packages might be the issue on my part, if you say that EFCore 3.0 works with SQLCipher for you. I tried stepping through the Batteries_V2.Init method (with JetBrains Rider) and method If more people will have the same issue I am willing to help you and investigate more but I already spent too many work hours on this issue so I am going for the 2.2.6 version. |
Ah, yes, I had problems with nuget packaging and the native builds for Xamarin.Mac. I do need to go back to that issue and try to find a workaround. |
@danielkraut Can you submit an issue on SQLitePCL.raw to track this work? |
|
I am in the process of updating our Microsoft.Data.Sqlite package, we are currently using v2.0.0. The transition to the official release 2.2.6 went smoothly, but I am considering delaying the update to use v3.0.0 when it is released. But we are using the bundle_sqlitecipher (and adding
PRAGMA key
after opening a connection) to enable database encryption and I was not able to figure out how to set it up to work with the current v3.0.0-rc1.19456.14.After some digging, apparently the v3.0.0 comes with a dependency to SQLitePCL.raw v2.0.0 (#14824) but the latest bundle_sqlcipher is 1.1.14. Is my understanding correct that there is currently no way to use the new
Password
property inSqliteConnectionStringBuilder
(#13828), since there is no provider which supports encryption?I tried installing and uninstalling different sqlite bundle/provider NuGet packages but nothing worked. I always ended up either with a running app without encryption support, or after setting ExcludeAsssets:
<PackageReference Include="SQLitePCLRaw.bundle_green" Version="2.0.0" ExcludeAssets="All" />
with and exception on
SQLitePCL.Batteries_V2.Init()
,or trying
SQLitePCL.Batteries_Init()
but with a build errorSo my final question is: is there a way to use the upcoming version 3.0.0 with database encryption? Do you know if there is upcoming bundle_sqlcipher v2.0.0 to support this?
Additional context
Microsoft.Data.Sqlite version: 3.0.0-rc1.19456.14
Target framework: WPF, .NET framework 4.7.2
Operating system: Windows 10
The text was updated successfully, but these errors were encountered: