microsoft / microsoft/WindowsAppSDK

WAP project added a fake inProcessServer entry to manifest in the AppxManifest.xml

Open
#6,351 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-MSIXBuildTools
Dominant language
C++
Stars
4.7k
Forks
471
Avg merge
3d 13h
Merged PRs (30d)
28

Description

### Describe the bug

I added a WinRTCOMServer exe project and referenced by the WAP project but not the entry project. However, a fake `inProcessServer` is added to the AppxManifest.xml automatically. Which breaks the build.

Package.appxmanifest
```xml



MyProject\WinRT.Host.dll






WinRTCOMServer\WinRTCOMServer.exe
multipleInstances





```

AppxManifest.xml

```xml



MyProject\WinRT.Host.dll






WinRTCOMServer\WinRTCOMServer.exe
multipleInstances








WinRTCOMServer\WinRTCOMServer.dll



```

This issue seems related to the Target `RemoveWinMDRefForManifestAutoGen` in the wapproj.
Therefore, the workaround below would fixed that

```xml


<_AppxWinmdFilesToHarvest Condition="'%(FileName)' == 'WinRTCOMServer'" Remove="@(_AppxWinmdFilesToHarvest)" />


```

### Steps to reproduce the bug

1. Create a WinRT COM Exe Server like this, and reference the project from WAP project. No need to set as entry project.

WinRTCOMServer

```xml


WinExe
true
true
WinRTCOMServer
true
true
latest
win-x64;win-arm64
net10.0-windows10.0.26100.0
10.0.26100.0
10.0.19041.0
true
true
win-x64
win-arm64
net10.0-windows$(TargetPlatformVersion);$(AssetTargetFallback)


true
$(TargetWindowsVersion)



all
runtime; build; native; contentfiles; analyzers; buildtransitive


all
runtime; build; native; contentfiles; analyzers; buildtransitive

```

2. Build the WAP project
3. Find the `error APPX0501: Validation error. error C00CE012: App manifest validation error: The app manifest must be valid as per schema: Line 115, Column 8`

### Expected behavior

Do not generate a fake `inProcessServer` entry in the Appxmanifest.xml automotically.

### Screenshots

_No response_

### NuGet package version

1.8.260317003

### Packaging type

Packaged (MSIX)

### Windows version

Windows 11 version 24H2 (26100, June 2025 Update)

### IDE

Visual Studio 2022

### Additional context

_No response_

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the WAP project's AppxManifest.xml generation and inspect RemoveWinMDRefForManifestAutoGen before _GenerateCurrentProjectAppxManifest. Reproduce the build using the WinRTCOMServer project and check how _AppxWinmdFilesToHarvest is populated. Done means the generated manifest omits the fake inProcessServer entry and passes APPX0501 validation.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, xml
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.