Reputation: 1165
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:\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 it without removing Akavache or VSMC?
Upvotes: 7
Views: 362
Reputation: 18827
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" />
Upvotes: 0
Reputation: 4308
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.
Upvotes: 4