In first case:
System.Data.Sqlite,System.Data.sqlite.core, system.data.sqlite.linq. While passing datasource path with password. It gives exception while opening a Sqliteconnection:
"SQL logic error
Cannot use "Password" connection string property: library was not built with encryption support, please see "https://www.sqlite.org/see" for more information".
so I added sqlitepcl.raw, sqlitepclraw.core. No change in result I got same exception.
In second scenario, in fresh way to add dll. I added dll :
sqlite-net-base, sqlite-net-sqlcipher, sqlitepclraw.bundle.e-sqlite3, sqlitepclraw.core. In this case, I tried to call connection with Sqliteasyncconnection and sqliteconnection. Both times exception says:
"You need to call SQLitePCL.raw.SetProvider(). If you are using a bundle package, this is done by calling SQLitePCL.Batteries.Init()".
I am using sqlite in .Net standard 2.0 with .Net framework 4.8 so I added all dll through nuget.
string connectionString = "Data Source="C:\Program Data\sampleproject.db;Password=p123".
In first case: System.Data.Sqlite,System.Data.sqlite.core, system.data.sqlite.linq. While passing datasource path with password. It gives exception while opening a Sqliteconnection: "SQL logic error Cannot use "Password" connection string property: library was not built with encryption support, please see "https://www.sqlite.org/see" for more information". so I added sqlitepcl.raw, sqlitepclraw.core. No change in result I got same exception.
In second scenario, in fresh way to add dll. I added dll : sqlite-net-base, sqlite-net-sqlcipher, sqlitepclraw.bundle.e-sqlite3, sqlitepclraw.core. In this case, I tried to call connection with Sqliteasyncconnection and sqliteconnection. Both times exception says: "You need to call SQLitePCL.raw.SetProvider(). If you are using a bundle package, this is done by calling SQLitePCL.Batteries.Init()".
In third sceanrio, I used Microsoft.data.sqlite.core and sqlitepclraw.bundle_e_sqlcipher according to "https://docs.microsoft.com/en-us/dotnet/standard/data/sqlite/encryption?tabs=netcore-cli". I am getting exception while creating connection. "The process has no package identity. (Exception from HRESULT: 0x80073D54)".
Which scenario will suit to allow me password encrypted db file to create and connect. What modification required. Thanks in advance.