Could not load file or assembly 'System.Data.SQLite.SEE.License,
Version=1.0.115.5, Culture=neutral, PublicKeyToken=433d9874d0bb98c5,
processorArchitecture=MSIL
如果底层依赖于Microsoft.Data.Sqlite 也会提示
You specified a password in the connection string, but the native SQLite
library 'e_sqlite3' doesn't support encryption.
System.Data.SQLite.Core
创建一个控制台项目,起名 OvOv.SqliteSystemCore
dotnet new console -n OvOv.SqliteSystemCore
cd OvOv.SqliteSystemCore
安装包
dotnet add package System.Data.SQLite.Core
使用SQLiteConnection创建一个连接,使用Password指定密码
using System.Data.SQLite;
static void Open()
{
string baseConnectionString = "Data Source=local.db";
var connectionString = new SQLiteConnectionStringBuilder(baseConnectionString)
{
Password = "123qwe"
}.ToString();
using SQLiteConnection? connection = new SQLiteConnection(connectionString);
connection.Open();
}
Open();
运行项目
dotnet run
就会出现如下错误。
System.IO.FileNotFoundException:“Could not load file or assembly
Could not load file or assembly 'System.Data.SQLite.SEE.License,
Version=1.0.115.5, Culture=neutral, PublicKeyToken=433d9874d0bb98c5,
processorArchitecture=MSIL
如果底层依赖于Microsoft.Data.Sqlite 也会提示
You specified a password in the connection string, but the native SQLite
library 'e_sqlite3' doesn't support encryption.
System.Data.SQLite.Core
创建一个控制台项目,起名 OvOv.SqliteSystemCore
dotnet new console -n OvOv.SqliteSystemCore
cd OvOv.SqliteSystemCore
安装包
dotnet add package System.Data.SQLite.Core
使用SQLiteConnection创建一个连接,使用Password指定密码
using System.Data.SQLite;
static void Open()
{
string baseConnectionString = "Data Source=local.db";
var connectionString = new SQLiteConnectionStringBuilder(baseConnectionString)
{
Password = "123qwe"
}.ToString();
using SQLiteConnection? connection = new SQLiteConnection(connectionString);
connection.Open();
}
Open();
运行项目
dotnet run
就会出现如下错误。
System.IO.FileNotFoundException:“Could not load file or assembly