UWP deploy app package bugs (Payload contains two or more files...)

ochhanz

Member
Nov 15, 2017
512
1
18
Visit site
Hello,

Deploying app packages for my app (store->create app packages (for side-loading)) seems to be quite buggy for some unknown reason. I almost get the following error (and some other similar "Payload contains two or more files..." errors):

"Payload contains two or more files with the same destination path 'System.Runtime.InteropServices.dll'. Source files:
C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\runtime.any.system.runtime.interopservices\4.1.0\lib\netcore50\System.Runtime.InteropServices.dll
C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\runtime.aot.system.runtime.interopservices\4.0.20\runtimes\aot\lib\netcore50\System.Runtime.InteropServices.dll
"

Now the strange thing is that if I clean and rebuild my solution several times each time, eventually it works and I can successfully deploy the app (works on both pc and phone). However this is really annoying so I would like to prevent this error entirely, is there a way?

Update: I am not sure but perhaps I found a fix. When I clear the NuGetPackage cache before deploying it does not seem to give any errors.
 
Last edited:

Members online

Forum statistics

Threads
326,568
Messages
2,248,576
Members
428,514
Latest member
Shiron