|Title:||SQLite.Interop.dll not found when using System.Data.SQLite.Core NuGet package with Xamarin|
|Last Modified:||2019-10-05 03:38:34|
|Version Found In:||1.0.110|
anonymous added on 2019-03-20 21:30:30:
When using the NuGet package System.Data.SQLite.Core from a Xamarin.Forms solution, and deploying the app on either Android or iOS, I get a system.dllnotfoundexception: 'sqlite.interop.dll'. I know this dll should be compiled for each system architecture natively, but, isn't there a version of this DLL for mono projects that works on Android and iOS? If there isn't, then why is this NuGet labelled as a .NET Standard 2.0 package when it actually isn't? I've tried forcing the dll inside the __override__ folder inside my android app's folder, but it just leads into another exception: 'System.TypeInitializationException: The type initializer for 'System.Data.SQLite.SQLiteFactory' threw an exception'. Can I have any leads or help on this matter? FYI, I already use Mono.Data.SQLite on my project, but we have come to realize there are e some behavior differences from the DataTable and DataRow classes between Mono.Data.SQLite and System.Data.SQLite.Core. Since a WPF project and Xamarin project both need to share a data access library, we need them to reference an SQLite ADO.NET provider that behaves the same, and System.Data.SQLite.Core seems to be our best shot.
anonymous added on 2019-03-20 21:41:07:
I must specify that I get the exception when trying to instantiate a SQLiteFactory or a SQLiteConnection, hence making the library useless.
mistachkin added on 2019-03-21 03:32:29:
The NuGet package includes the .NET Standard managed assembly and native interop assemblies for Windows (x86 and x64), Linux (x64), and macOS (x64). To clarify, it seems the native interop assembly for your target platform is not included? I'm not sure how to compile and test the native interop assembly for Android and iOS platforms. I'm open to suggestions on how to do this.