Bug 53022 - iOS project crashes when using Akavache 5.0.0.0 and SQLite net pcl 1.3.1
Summary: iOS project crashes when using Akavache 5.0.0.0 and SQLite net pcl 1.3.1
Status: RESOLVED ANSWERED
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-03-03 16:28 UTC by mli
Modified: 2017-03-03 21:07 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
A bear bone Xamarin Solution with Akavache and Sqlite net pcl 1.3.1 nuget packages (55.12 KB, application/zip)
2017-03-03 16:39 UTC, mli
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED ANSWERED

Description mli 2017-03-03 16:28:37 UTC
Good morning,

I ran into a weird issue with Xamarin iOS project where the app crashes when I have Akavache 5.0.0.0 and SQLite net pcl 1.3.1 nuget packages in the same project. The error message that I received is 

"System.TypeInitializationException: The type initializer for 'Akavache.Sqlite3.Internal.SQLiteConnection' threw an exception. ---> System.TypeLoadException: Could not load type 'SQLitePCL.SQLite3Provider_internal' from assembly 'SQLitePCLRaw.provider.internal, Version=1.0.0.0, Culture=neutral, PublicKeyToken=89ae75803b2c608d'". 

This was tested on the iPhoneSimulator - iPhone SE iOS 10.2

On Xamarin Droid project with virtual device (Nexus 4 - Marshmallow), everything is fine.

I have attached a sample test project (a bear bone Xamarin Solution with Akavache and Sqlite net pcl 1.3.1 nuget packages) in this bug. Any help would be greatly appreciated.

Thanks!

Ming


Xamarin Studio Info:
Xamarin Studio Professional
Version 6.2 (build 1821)

Nuget 3.5.0.0

Xamarin Android
Version 7.1.0.41
Supported Android versions: 6.0, 7.0 and 7.1 (API 23, 24 and 25).
SDK Tools Version: 25.2.2
SDK Platfom Tools Version: 25

Xamarin.iOS
Version 10.4.0.123

Operating System
Mac OS X 10.11.6
Comment 1 mli 2017-03-03 16:39:32 UTC
Created attachment 20121 [details]
A bear bone Xamarin Solution with Akavache and Sqlite net pcl 1.3.1 nuget packages
Comment 2 Alex Soto [MSFT] 2017-03-03 20:41:05 UTC
Seems like Akavache needs to update to version 1.1.2 of SQlitePCLRaw, by doing this everything works fine :)
Comment 3 mli 2017-03-03 21:07:33 UTC
Wow! Thanks a lot!