在UWP项目中使用Akavache 移动中心时构建错误



我有UWP应用程序并使用Akavache。添加了MobileCenter Nuget软件包后,我遇到了构建应用程序的问题:

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

如何在不删除Akavache或VSMC的情况下进行修复?

基于@Eric cint注释,我尝试排除移动中心的重复DLL,据我所知,移动中心使用Akavache SQLite Sqlite依赖关系正常工作。我没有在运行时测试Akavache。

我正在使用project.json,这对我有用:

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

dependencies对象。

使用PackageReference消耗nugets的技术,文档说使用Exclude="All"标志

不幸的是,该文档是错误的,正如本github问题所强调的那样,实际上您需要使用 ExcludeAssets="All"

因此,成品看起来像

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

最新更新