[UWP] Payload contains two or more files with the same destination path

Aria Rad 51 Reputation points
2023-01-31T21:12:20.7933333+00:00

Hello,

I have a fairly simple app that I would like to publish. When I try to create an app package for x86, x64 and ARM, the process returns 163 errors which all say "Payload contains two or more files with the same destination path"

Here are a couple of examples:

Payload contains two or more files with the same destination path 'System.Runtime.dll', but they are different sizes. Source files: C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\runtime.win10-x86.microsoft.netcore.universalwindowsplatform\6.2.14\runtimes\win10-x86\lib\uap10.0.15138\System.Runtime.dllC:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\runtime.win10-x86-aot.microsoft.netcore.universalwindowsplatform\6.2.14\runtimes\win10-x86-aot\lib\uap10.0.15138\System.Runtime.dll 
Payload contains two or more files with the same destination path 'System.Data.dll', but they have different content. Source files: C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\runtime.win10-x86.microsoft.netcore.universalwindowsplatform\6.2.14\runtimes\win10-x86\lib\uap10.0.15138\System.Data.dllC:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\runtime.win10-x86-aot.microsoft.netcore.universalwindowsplatform\6.2.14\runtimes\win10-x86-aot\lib\uap10.0.15138\System.Data.dll 
Payload contains two or more files with the same destination path 'System.Threading.dll', but they are different sizes. Source files: C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\runtime.win10-x86.microsoft.netcore.universalwindowsplatform\6.2.14\runtimes\win10-x86\lib\uap10.0.15138\System.Threading.dllC:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\runtime.win10-x86-aot.microsoft.netcore.universalwindowsplatform\6.2.14\runtimes\win10-x86-aot\lib\uap10.0.15138\System.Threading.dll

For the entire error list, see the PDF file: Error list when creating app bundles.pdf

How can I solve this issue? My Nuget packages are up to date.

Universal Windows Platform (UWP)
0 comments No comments
{count} votes

Accepted answer
  1. Junjie Zhu - MSFT 17,841 Reputation points Microsoft Vendor
    2023-02-01T02:50:51.7266667+00:00

    Hi @Aria Rad ,

    Welcome to Microsoft Q&A!

    Due to the complex causes of this problem, there are many solutions. You can choose one of them to try.

    1. Right Click in your Project > Manage NuGet Package > Package Sources > Unckeck "Microsoft Visual Studio Offline Packages"

    User's image

    2. Install Microsoft.Net.Native.Compiler in NuGet.

    User's image

    Thank you


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


1 additional answer

Sort by: Most helpful
  1. Luca Ziegler 6 Reputation points
    2023-11-06T14:14:14.8033333+00:00

    I fixed this issue by selecting the newest target versions in all UWP library, they were not the same.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.