Skip to content

Make natvis find winmds from the WinMD Reference - #1628

Draft
Yexuan Xiao (YexuanXiao) wants to merge 1 commit into
microsoft:masterfrom
YexuanXiao:natvis-winmd2
Draft

Yexuan Xiao (YexuanXiao) wants to merge 1 commit into
microsoft:masterfrom
YexuanXiao:natvis-winmd2

Conversation

@YexuanXiao

@YexuanXiao Yexuan Xiao (YexuanXiao) commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Fix microsoft/WindowsAppSDK#2809.

Currently, the VSIX extension only looks for winmd files from the exe directory and the system directory, making the visualization useless. In particular, metadata from the WindowsAppSDK was also not taken into consideration.

This patch passes the information of all winmd references to the binary through MSBuild, which is then parsed by the VSIX plugin to obtain the paths of the referenced winmd files. All of this is automatic.

All winmds are loaded lazily. When looking up a type, the extension first collects the paths of all winmd files, and then looks for the appropriate file based on the namespace of the type. Once a namespace has been looked up, it is recorded to avoid repeating a futile load the next time.

@YexuanXiao

Copy link
Copy Markdown
Contributor Author

Moved to draft because I found that some environments may not display the visualization of types in WAS.

@YexuanXiao
Yexuan Xiao (YexuanXiao) marked this pull request as draft September 18, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Natvis for C++/WinRT doesn't work

1 participant