Skip to content
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

Library e_sqlcipher Not Found After Updating to SQLite-net-sqlcipher 1.9.172 #1264

Open
Alex-Jud opened this issue Dec 23, 2024 · 0 comments

Comments

@Alex-Jud
Copy link

Description
After updating from sqlite-net-sqlcipher version 1.8.116 to 1.9.172, I am encountering an issue where the library e_sqlcipher is reported as not found. This occurs despite having the correct dependencies installed and explicitly initializing SQLitePCL.Batteries_V2.Init().

The same code works correctly with sqlite-net-sqlcipher 1.8.116 and SQLitePCLRaw.bundle_e_sqlcipher 2.0.7. However, with the newer version (which requires SQLitePCLRaw.bundle_e_sqlcipher 2.1.10), I receive the following exception:

Exception: Library e_sqlcipher not found
Platform: win
Suffix: DLL
Possibilities (2):
1) \bin\Debug\runtimes\win-x86\native\e_sqlcipher.dll
2) \bin\Debug\e_sqlcipher.dll
win TryLoad: \bin\Debug\runtimes\win-x86\native\e_sqlcipher.dll
thrown: System.ComponentModel.Win32Exception (0x80004005): The specified module could not be found

Environment
Target Framework: .NET Framework 4.8
SQLite-net-sqlcipher Version: 1.9.172
SQLitePCLRaw.bundle_e_sqlcipher Version: 2.1.10
OS: Windows 10
Steps to Reproduce
Install sqlite-net-sqlcipher 1.9.172 and SQLitePCLRaw.bundle_e_sqlcipher 2.1.10 in a .NET Framework 4.8 project.

Initialize SQLite with the following code:

SQLiteConnectionString options = new SQLiteConnectionString(App.databaseUserPath, true, key: App.DeviceID);
using (SQLiteConnection connectionUser = new SQLiteConnection(options))
{
    // Perform database operations
}

Observe the e_sqlcipher library not found exception at runtime.

Additional Notes
I have explicitly called SQLitePCL.Batteries_V2.Init() before opening the connection, but this does not resolve the issue.
Downgrading back to sqlite-net-sqlcipher 1.8.116 and SQLitePCLRaw.bundle_e_sqlcipher 2.0.7 resolves the problem, with no changes to the code or project configuration.

Request
Could you provide guidance or investigate why this issue occurs with the updated versions? If additional setup or dependencies are required, it would be helpful to include them in the documentation.

Thank you for your assistance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant