AppCenter + UWP + IoT = Cannot initialize SQLite library

0

I'm trying to integrate AppCenter Analytics into my Windows IoT Core UWP app. On startup I keep getting the following error:

[AppCenter] ERROR: Failed to configure App Center. Microsoft.AppCenter.Storage.StorageException: Cannot initialize SQLite library. ---> System.IO.FileLoadException: Could not load file or assembly 'SQLite-net, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) at Microsoft.AppCenter.Storage.StorageAdapter..ctor(String databasePath) at Microsoft.AppCenter.Storage.Storage.DefaultAdapter() --- End of inner exception stack trace --- at Microsoft.AppCenter.Storage.Storage.DefaultAdapter() at Microsoft.AppCenter.AppCenter.InstanceConfigure(String appSecretOrSecrets) at Microsoft.AppCenter.AppCenter.PlatformStart(String appSecret, Type[] services)

I get this error on both Foreground and Background apps. Adding a SQLite.UWP.2015 SDK reference doesn't help. Adding SQLite.Net-PCL package reference doesn't help.

Does AppCenter analytics work with UWP + IoT? If so how? If not what are the alternatives?

uwp
windows-10-iot-core
visual-studio-app-center
asked on Stack Overflow Jun 1, 2018 by Lee Richardson • edited Jun 1, 2018 by Lee Richardson

2 Answers

0

AppCenter analytics works with UWP on Windows IoT Core. From your error log, I think it is due to miss the relative sqlite library or the version is conflict with other library which depends on SQLite-net 1.1. AppCenter analytics depends on sqlite-net-pcl 1.3.1 or later.You can try to install this package in Package Manager Console via command:

Install-Package sqlite-net-pcl -Version 1.4.118
answered on Stack Overflow Jun 1, 2018 by Michael Xu - MSFT
0

There is a conflict between Microsoft.AppCenter.Analytics v1.6.1 and sqlite-net-pcl v1.4.118. To resolve the problem downgrade sqlite-net-pcl to 1.3.3.

answered on Stack Overflow Jun 3, 2018 by Lee Richardson

User contributions licensed under CC BY-SA 3.0