Merge pull request #60 from top5five/master

Microsoft.Data.Sqlite.Core 10.0.0 以上的版本就可以支持在 Xamarin.Android 上运行
This commit is contained in:
Stone 2025-06-16 16:11:03 +08:00 committed by GitHub
commit 3379b34b65
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -23,8 +23,9 @@ internal class SQLite : FileDbBase
protected override DbProviderFactory? CreateFactory()
{
// Mono有自己的驱动因为SQLite是混合编译里面的C++代码与平台相关,不能通用;注意大小写问题
if (Runtime.Mono)
return GetProviderFactory(null, "Mono.Data.Sqlite.dll", "System.Data.SqliteFactory")!;
//Microsoft.Data.Sqlite.Core 10.0.0 以上的版本就可以支持在 Xamarin.Android 上运行
//if (Runtime.Mono)
// return GetProviderFactory(null, "Mono.Data.Sqlite.dll", "System.Data.SqliteFactory")!;
var type =
PluginHelper.LoadPlugin("System.Data.SQLite.SQLiteFactory", null, "System.Data.SQLite.dll", null) ??