Updated to current known issues and workarounds:
Good sample app link applying workarounds by @cwrea: https://github.com/cwrea/XamarinTodo/tree/master
Original Issue:
From @alexdrl on November 21, 2017 8:44
A Xamarin.iOS app with EFCore 2.0 needs a call to
SQLitePCL.Batteries_V2.Init();
If the call is not made, the app initialization throws this error message.
You need to call SQLitePCL.raw.SetProvider(). If you are using a bundle package, this is done by calling SQLitePCL.Batteries.Init().
Like explained here
Steps to reproduce
Xamarin.iOS project working with EFCore 2.0. Solution with a common .NET Standard project which shares code between iOS and Android, using PackageReference.
Further technical details
EF Core version: 2.0.0
Database Provider: Microsoft.EntityFrameworkCore.Sqlite
Operating system: iOS
IDE: Visual Studio 15.4
Copied from original issue: dotnet/efcore#10361
Updated to current known issues and workarounds:
For Xamarin.Android, use package.config instead of PackageReference (dependent on System.Runtime.CompilerServices.Unsafe linked away in release leading to crashes android#1196).[assembly: Preserve (typeof (System.Linq.Queryable), AllMembers = true)](dependent on Xamarin requires linker hints to preserve APIs accessed via reflection efcore#10963) or using a LinkDescription.xml file.SQLitePCL.Batteries_V2.Init()(see https://github.com/ericsink/SQLitePCL.raw/wiki/SQLitePCL.Batteries.Init).Good sample app link applying workarounds by @cwrea: https://github.com/cwrea/XamarinTodo/tree/master
Original Issue:
From @alexdrl on November 21, 2017 8:44
A Xamarin.iOS app with EFCore 2.0 needs a call to
If the call is not made, the app initialization throws this error message.
Like explained here
Steps to reproduce
Xamarin.iOS project working with EFCore 2.0. Solution with a common .NET Standard project which shares code between iOS and Android, using PackageReference.
Further technical details
EF Core version: 2.0.0
Database Provider: Microsoft.EntityFrameworkCore.Sqlite
Operating system: iOS
IDE: Visual Studio 15.4
Copied from original issue: dotnet/efcore#10361