Skip to content

REGRESSION error APPX1101: Payload contains two or more files with the same destination path 'resources.pri' when using WinUI integration test #5845

@weitzhandler

Description

@weitzhandler

Describe the bug

When a UI integration test is referencing a WinUI app, if upgraded to .NET 9, the following error occurs:

00:59:46:993 2>C:\Users\Shimmy.nuget\packages\microsoft.windows.sdk.buildtools.msix\1.7.20250829.1\build\Microsoft.Windows.SDK.BuildTools.MSIX.Packaging.targets(1365,5): error APPX1101: Payload contains two or more files with the same destination path 'resources.pri'. Source files:
00:59:46:993 2>C:\Users\Shimmy.nuget\packages\microsoft.windows.sdk.buildtools.msix\1.7.20250829.1\build\Microsoft.Windows.SDK.BuildTools.MSIX.Packaging.targets(1365,5): error APPX1101: D:\Users\Shimmy\Documents\Visual Studio 2022\Projects\App16\App16\bin\x64\Debug\net8.0-windows10.0.19041.0\resources.pri
00:59:46:993 2>C:\Users\Shimmy.nuget\packages\microsoft.windows.sdk.buildtools.msix\1.7.20250829.1\build\Microsoft.Windows.SDK.BuildTools.MSIX.Packaging.targets(1365,5): error APPX1101: D:\Users\Shimmy\Documents\Visual Studio 2022\Projects\App16\UnitTestApp1\bin\x64\Debug\net8.0-windows10.0.19041.0\resources.pri
00:59:47:016 2>Done building project "UnitTestApp1.csproj" -- FAILED.
00:59:47:031 ========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
00:59:47:031 ========== Build completed at 00:59 and took 10.522 seconds ==========

Steps to reproduce the bug

https://github.com/weitzhandler/WinUIIntegrationTestBugRepro

  1. Create new WinUI Blank App
  2. Add a WinUI Unit Test App to solution (weitzhandler/WinUIIntegrationTestBugRepro@f1afbdd)
  3. Verify build succeeded
  4. Drag the WinUI app onto the test app to add a reference (weitzhandler/WinUIIntegrationTestBugRepro@c575fa5)
  5. Try to build
  6. Error occurs
  7. Downgrade WinAppSDK to 1.7 (weitzhandler/WinUIIntegrationTestBugRepro@b3a7c86)
  8. Build succeeds
  9. Updade WinAppSDK back to 1.8 (weitzhandler/WinUIIntegrationTestBugRepro@2a1e1bc)
  10. Build fails again

Expected behavior

Project should build successfully

Screenshots

Image

NuGet package version

Windows App SDK 1.8.0: 1.8.250907003

Packaging type

No response

Windows version

No response

IDE

Visual Studio 2022

Additional context

  • The funny bit is the error is coming from C:\Users\Shimmy.nuget\packages\microsoft.windows.sdk.buildtools.msix*1.7.20250829.1*\build\Mi... even thos I've updated the package to 1.8
  • I've tried clearing NuGet cache - no success.
  • Tried changing Windows version - no change.

Metadata

Metadata

Assignees

Labels

area-PackagingTopics related to packaging behavior of Windows App SDKneeds-triage

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions