microsoft / microsoft/WindowsAppSDK

MSB6003 build failure from MakePri collision

Open
#6,570 0 comments 0 reactions 0 assignees View on GitHub
area-MSIXBuildTools needs-triage
Dominant language
C++
Stars
4.7k
Forks
471
Avg merge
3d 13h
Merged PRs (30d)
28

Description

### Describe the bug

It appears that WinAppSdkExpandPriContent outputs can collide, which fails the build a Win32Exception:

```
The specified task executable "MakePri.exe" could not be run. System.ComponentModel.Win32Exception (0x80004005): Invalid access to memory location
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at Microsoft.Build.Utilities.ToolTask.StartToolProcess(Process proc)
at Microsoft.Build.Utilities.ToolTask.ExecuteTool(String pathToTool, String responseFileCommands, String commandLineCommands)
at Microsoft.Build.Utilities.ToolTask.Execute()
```

### Steps to reproduce the bug

https://github.com/jeremy-visionaid/MauiTestApp/tree/makepri-collision

```
msbuild MauiTestApp.slnx -property:Configuration=Release -bl -t:Restore
msbuild MauiTestApp.slnx -property:Configuration=Release -bl
```

The actual failure is hard to reproduce in a standalone test, but happens frequently on CI for a large solution that outputs multiple products/applications. However, the duplicate output items are easily identifiable in the binlogs.

### Expected behavior

Build succeeds

### Screenshots

_No response_

### NuGet package version

1.7.20250829.1

### Packaging type

Unpackaged

### Windows version

_No response_

### IDE

Other

### Additional context

[msbuild.zip](https://github.com/user-attachments/files/29114028/msbuild.zip)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the linked MauiTestApp reproduction and run the two provided msbuild commands with binary logging enabled. Inspect the binlogs for duplicate WinAppSdkExpandPriContent outputs and the MakePri.exe failure; done means the large-solution build completes without the collision or MSB6003 error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.