Using AppCenter with SQLCipher for .NET

Microsoft AppCenter provides a popular set of tools that enable crash reporting, application analytics, and other features for integrating applications. Due to the design of AppCenter, it brings in several transitive NuGet dependencies that include assets that conflict with SQLCipher packages. As such, we recommend including the following explicit PackageReference statements in any project file that includes AppCenter.

<PackageReference Include="sqlite-net-pcl">
  <Version>*</Version>
  <ExcludeAssets>All</ExcludeAssets>
</PackageReference>
<PackageReference Include="SQLitePCLRaw.bundle_green">
  <Version>*</Version>
  <ExcludeAssets>All</ExcludeAssets>
</PackageReference>

This same technique can be used to resolve conflicts with any other package that include a dependency on sqlite-net-pcl or any non-Zetetic SQLitePCLRaw bundles.

HI, I have tested this solution, and even though it makes the project compile and run with the encrypted DB AppCenter doesn’t send any events, or crashes at all to the server, probably because AppCenter fails to use default SQL libraries.

I have this configuration: <PackageReference Include="zetetic-sqlcipher-windows-uap"> <Version>4.4.0</Version> </PackageReference> <PackageReference Include="zetetic-sqlite-net-base"> <Version>4.4.0</Version> </PackageReference> <PackageReference Include="sqlite-net-pcl"> <Version>*</Version> <ExcludeAssets>All</ExcludeAssets> </PackageReference> <PackageReference Include="SQLitePCLRaw.bundle_green"> <Version>*</Version> <ExcludeAssets>All</ExcludeAssets> </PackageReference>

In a UWP project targeting 14393. The AppCente version is NuGet Gallery | Microsoft.AppCenter.Analytics 2.6.4 thanks!