I am developing a multi-platform PCL application with Xamarin.Forms using this sqlite-pcl package , as shown in this example .
Caution The nuget PCL library contains the wrong link on the left when you go to the Project Site - it points to the SQLite-net site ... So I donβt even know what the correct Sqlite-PCL link will be ...
It worked fine until this morning when I tried to install some other packages (note that I did not touch sqlite packages at first). Suddenly, my application crashed on first access to the database, saying that
System.IO.FileLoadException: 'Could not load file or assembly' SQLite-net, Version = 1.4.118.0, Culture = neutral, PublicKeyToken = null '. The installed assembly manifest definition does not match the Help assembly. (Exception from HRESULT: 0x80131040)
Ok, ok, I started looking for forums, trying to find which part might be the source of the problem - nothing helped - uninstalling and reinstalling the package, rebooting, manually deleting all the links to this DLL that I found and recompiled, redeploying ... I'm actually stuck, I tried Fuslogvw without success ... I'm pretty desperate for this - any suggestion on how I could find the origin of the problem?
Technical details: - VS Community 2017 - Build configuration: Debugging - Any processor - UWP when processing locales - is there any other relevant data?
OK, after several hours of scanning, and thanks to @ yuri-s, I installed the SQLite.Net.Async-PCL package SQLite.Net.Async-PCL . I had to update some using suggestions, but in the end I seem to have got there.
However, I am stuck at the last point: I need to create a DB connection using the platform-specific assembly in this particular library, but I could not find what the code suggested in the proposed approach here (last post). But I could not understand what code was supposed to get into the dependency interface of each OS ( SQLite.Net.Platform does not seem to exist in this package).
In general, SQLite-PCL packages are quite confusing - I think the community will benefit from clearly distinguishing them ...!