Skip to content

Xamarin.iOS app with EFCore 2.0 SQLitePCL.Batteries.Init() #10361

@alexdrl

Description

@alexdrl

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions