reactiveui / Akavache

An asynchronous, persistent key-value store created for writing desktop and mobile applications, based on SQLite3. Akavache is great for both storing important data as well as cached local data that expires.

Home Page:https://evolve.xamarin.com/session/56e2044afd00c0253cae33a3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Akavache and Microsoft App Center - Xamarin Forms UWP store release will not build SQLitePCLRaw.core

JoshuaLogue opened this issue · comments

Describe the bug
I am trying to create a Microsoft Store release for a Xamarin Forms app but it is failing to build
when I have Compile with .NETNative tool chain enabled. It builds fine when this is not enabled and in Debug mode. I am using both Akavache and App Center so I assume it might be an issue with that? Or it could be a missing nuget package?

The error is:
error : Method 'SQLite3.GetErrmsg(sqlite3)' will always throw an exception due to the missing method 'raw.sqlite3_errmsg(sqlite3)' in assembly 'SQLitePCLRaw.core'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.

Steps To Reproduce
I am targeting NetStandard 2.0 and built for x86. Since I have App Center as well I have followed the advice in the read me and have this line when I initialise the app:
Akavache.Sqlite3.Registrations.Start("ApplicationName", () => SQLitePCL.Batteries_V2.Init());

Following packages in core project:
<PackageReference Include="akavache.core" Version="6.10.4" /> <PackageReference Include="akavache.sqlite3" Version="6.10.4" /> <PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" Version="2.0.2" /> <PackageReference Include="SQLitePCLRaw.bundle_green" Version="2.0.2" /> <PackageReference Include="SQLitePCLRaw.core" Version="2.0.2" /> <PackageReference Include="SQLitePCLRaw.lib.e_sqlite3" Version="2.0.2" /> <PackageReference Include="SQLitePCLRaw.provider.e_sqlite3" Version="2.0.2" /> <PackageReference Include="Newtonsoft.Json" Version="12.0.3" /> <PackageReference Include="Microsoft.AppCenter" Version="2.6.4" /> <PackageReference Include="Microsoft.AppCenter.Crashes" Version="2.6.4" /> <PackageReference Include="Microsoft.AppCenter.Analytics" Version="2.6.4" />

and in the UWP project
<PackageReference Include="akavache.core"> <Version>6.10.4</Version> </PackageReference> <PackageReference Include="akavache.sqlite3"> <Version>6.10.4</Version> </PackageReference> <PackageReference Include="Microsoft.AppCenter"> <Version>2.6.4</Version> </PackageReference> <PackageReference Include="Microsoft.AppCenter.Analytics"> <Version>2.6.4</Version> </PackageReference> <PackageReference Include="Microsoft.AppCenter.Crashes"> <Version>2.6.4</Version> </PackageReference> <PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform"> <Version>6.2.9</Version> </PackageReference> <PackageReference Include="Newtonsoft.Json"> <Version>12.0.3</Version> </PackageReference> <PackageReference Include="Splat"> <Version>9.3.11</Version> </PackageReference> <PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3"> <Version>2.0.2</Version> </PackageReference> <PackageReference Include="SQLitePCLRaw.bundle_green"> <Version>2.0.2</Version> </PackageReference> <PackageReference Include="SQLitePCLRaw.core"> <Version>2.0.2</Version> </PackageReference> <PackageReference Include="SQLitePCLRaw.lib.e_sqlite3"> <Version>2.0.2</Version> </PackageReference> <PackageReference Include="SQLitePCLRaw.provider.e_sqlite3.uwp10"> <Version>1.1.14</Version> </PackageReference>
Expected behavior
For the app to build and run
Environment

  • OS: Xamarin Forms UWP
  • Device: UWP
  • Version: Target version is v1809

Hey @JoshuaLogue 👋,

Thank you for opening an issue. We will get back to you as soon as we can. Also, check out our Open Collective and consider contributing financially.

https://opencollective.com/reactiveui

PS.: We offer priority support for all financial contributors. Don't forget to add priority label once you start contributing 😄

An advanced, composable, functional reactive model-view-viewmodel framework for all .NET platforms!
commented

Might be worth asking @ericsink on the sqliteRawPcl project.

So I got this to build.

Step 1: remove all Akavache and SQLite packages from UWP project.
Step 2: as per this conversation to get around memory issues: dotnet/corert#7687 (comment)
I had to downgrade akavache to v6.5.1