microsoft / microsoft/WindowsAppSDK
WAP project remove the WinRT COM Server's winmd file incorrectly
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 4.7k
- Forks
- 471
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 28
Description
### Describe the bug
Related to #6351
WAP output directory structure
```
WAP_Output_Directory
├── OtherProject // ref WinRTCOMServer.winmd through
│ ├── ......
│ └── WinRTCOMServer.winmd
├── WinRTCOMServer
│ ├── ......
│ ├── WinRTCOMServer.dll
│ └── WinRTCOMServer.exe // No WinRTCOMServer.winmd
└── WinRTCOMServer.winmd // Placed here incorrectly
```
In `WAP_Output_Directory\\WinRTCOMServer\\`, there is no `WinRTCOMServer.winmd` placed beside `WinRTCOMServer.exe`. This behavior is because although we declare the WinRTCOMServer as `OutOfProcessServer` but WAP project will always consider it as `InProcessServer` incorrectly which already described in #6351 .
For in-process server case, the server implementation should be placed next to the client as it will be loaded into the client process, however, it's not the case for out-of-process. But the toolchain assumes we are using an in-process server always and does this unnecessary thing.
**Workaround:**
Add include the .winmd in the WinRTCOMServer by yourself.
```xml
false
%(Filename).winmd
PreserveNewest
```
### Steps to reproduce the bug
No need, please check the steps in #6351
### Expected behavior
```
WAP_Output_Directory
├── OtherProject
│ ├── ......
│ └── WinRTCOMServer.winmd
└── WinRTCOMServer
├── ......
├── WinRTCOMServer.dll
├── WinRTCOMServer.exe
└── WinRTCOMServer.winmd
```
### 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the related issue #6351 and examining how WAP packages the OutOfProcessServer described here. Verify the packaged output with the provided project-item workaround as a reference; done means WinRTCOMServer.winmd is beside WinRTCOMServer.exe while remaining available to OtherProject, without requiring that manual workaround.
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
- 48/100