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

I have UWP app and use Akavache. After adding MobileCenter NuGet packages I have this problem whith building app:

Payload contains two or more files with the same destination path 'SQLitePCLRaw.batteries_v2.dll'. 
Source files:C:Usersuser.nugetpackagesSQLitePCLRaw.bundle_e_sqlite31.1.0libuap10.0SQLitePCLRaw.batteries_v2.dll
C:Usersuser.nugetpackagesSQLitePCLRaw.bundle_green1.1.2libuap10.0SQLitePCLRaw.batteries_v2.dll

How can I fix it without removing Akavache or VSMC?


Based on @Eric Sink comment, I tried to the exclude the Mobile Center duplicate DLL and as far as I can tell, Mobile Center works correctly using the Akavache sqlite dependency. I didn't test Akavache at runtime though.

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

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

inside dependencies object.


Using the PackageReference technique of consuming nugets the documentation says to use the Exclude="All" flag

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

So the finished product will look something like

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

链接地址: http://www.djcxy.com/p/96410.html

上一篇: Java ArrayList真的比C ++向量要慢吗?

下一篇: 在UWP项目中使用Akavache + Mobile Center时出现错误