I’ve an app created in maui (c# 7). Now I’ve tried to update to c# 8.0 and updated ALL nuget packages.
From now, I’m unable to open connection to SQLLite internal DB
public const SQLite.SQLiteOpenFlags Flags =
SQLite.SQLiteOpenFlags.ReadWrite |
SQLite.SQLiteOpenFlags.Create |
SQLite.SQLiteOpenFlags.SharedCache;
string sPath = BCDataConstants.DatabasePath;
// value = /data/user/0/it.gattoneroph.photoapp/files/CAPhoto.db
// cames from => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "CAPhoto.db");
Database = new SQLiteAsyncConnection(sPath, Flags);
// no error but "System.TypeInitializationException: The type initializer for 'SQLite.SQLiteConnection' threw an exception." in ALL properties
CreateTableResult s= Database.CreateTableAsync<Tab_TabellaDatabase>().Result;
// here crashes
VS 2022 on win 11 + emulator API 30
c# 8.0
Nuget Packages
- SQLitePCLRaw.Core 2.1.8
- SQLite 3.13.0
- SQLlite.PCLRaw.lib.e_sqlite3 2.1.8
- SQLitePCLRaw.bundle_e_sqlite3 2.1.8
- SQLitePCLRaw.bundle_green 2.1.8
- System.Data.SQLite.Core 1.0.118
- SQLitePCLRaw.provider.dynamic_cdecl 2.1.8
What can I do?
Tried everything I know.