MicrosoftEdge / MicrosoftEdge/WebView2Feedback

[Problem/Bug]: Using wv2winrt results in the project's .winmd file being modified on every compilation (triggering rebuilds of dependent projects)

Open
#5,567 0 comments 0 reactions 1 assignee View on GitHub

@Navdeep-ss is already working on this.

Since Apr 22, 2026.

bug
Dominant language
PowerShell
Stars
526
Forks
67
PR merge metrics
No merged PRs in 30d

Description

What happened?

In my C++/WinRT non-packaged WinUI3 project, I have a UserControl that hosts a WebView2 control. I've enabled use of the wv2winrt tool (via the Project Properties menu) in order to create a WinRTAdapter::DispatchAdapter for wrapping the host control and passing it to CoreWebView2::AddHostObjectToScript.

Everything compiles and runs properly, but I noticed that even small changes to this project's code were triggering rebuilds of other projects that have references to it. So I ran builds with diagnostic verbosity, and it appears that the wv2winrt tool always causes the project's .winmd output to be modified, which causes other dependent projects to rebuild. This occurs even if my project's .idl interfaces remain unchanged.

Importance

Low. My app is not very affected, or this only affects development.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

147.0.3912.72

SDK Version

1.0.3912.50

Framework

WinUI3/WinAppSDK

Operating System

Windows 11

OS Version

10.0.26200 Build 26200

Repro steps

Create a new project C++/WinRT WinUI desktop component > Right click for Properties > Common Properties > WebView2 > Use the wv2winrt tool - Yes (and add Namespace.Classname to Include filters).

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

No, this never worked

Last working version (if regression)

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.