Build error when using Akavache + Mobile Center in a UWP project

I have a UWP application and use Akavache. After adding MobileCenter NuGet packages, I have this problem creating an application:

Payload contains two or more files with the same destination path 'SQLitePCLRaw.batteries_v2.dll'. Source files:C:\Users\user\.nuget\packages\SQLitePCLRaw.bundle_e_sqlite3\1.1.0\lib\uap10.0\SQLitePCLRaw.batteries_v2.dll C:\Users\user\.nuget\packages\SQLitePCLRaw.bundle_green\1.1.2\lib\uap10.0\SQLitePCLRaw.batteries_v2.dll 

How can I fix this without uninstalling Akavache or VSMC?

+7
uwp akavache mobile-center visual-studio-app-center
source share
2 answers

Based on @Eric Sink's comment, I tried to exclude a duplicate DLL for Mobile Center, and as far as I can tell, Mobile Center is working correctly using the sqlite dependency on Akavache. However, I did not test Akavache at runtime.

I am using project.json and this worked for me:

 "SQLitePCLRaw.bundle_green": { "version": "1.1.2", "exclude": "all" } 

inside the dependencies object.

+4
source share

Using the PackageReference method of nugets consumption, the documentation says that the Exclude="All" flag is used

Unfortunately, the documentation is incorrect, as highlighted by this github issue , and you need to use ExcludeAssets="All"

So, the finished product will look something like

<PackageReference Include="SQLitePCLRaw.bundle_green" Version="1.1.9" ExcludeAssets="All" />

0
source share

All Articles