How to System.Data.SQLite Interop.dll on Xamarin.Forms?

Viewed 1011

I get the following problem every time I try to run my mobile application:

System.DllNotFoundException: 
'SQLite.Interop.dll assembly:<unknown assembly> type:<unknown type> member:(null)'

To put this in some context:
I am developing on Xamarin.Forms [4.3.0] (in this case running the build on Android 9.0 x86). The client-side library runs on .NET Standard 2.0 and I have installed System.Data.SQLite.Core (1.0.112) from NuGet.

When you look up my problem, you will find people saying to put the SQLite.Interop.dll's into the x86/x64 folders.
But when looking for these files there are none for .NET Standard at all, only for .NET Framework. I tried using the SQLite.Interop.dll's from the precompiled statically-linked binaries from the .NET Framework 4.6 version.

Screenshot of the project structure

Same error though.

Unfortunately, it is not possible for me to switch the SQLite library as I am porting a desktop version to mobile which uses this lib.

1 Answers

if they have not made a mess in the classes and functions you need to port you can use "Microsoft.Data.SQLite", there is a difference but is not as far away from usable as the crazy nonsense you need to do with "SQLite-Net-Pcl"

Related