MicrosoftEdge / MicrosoftEdge/WebView2Feedback

[Problem/Bug]: WebView2CompositionControl regressions compared to WebView2

Open
#5,566 1 comment 3 reactions 1 assignee View on GitHub

@venky8951 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?

After upgrading Microsoft.AspNetCore.Components.WebView.Wpf from 9.0.120 to 10.0.51 that switches from Microsoft.Web.WebView2.Wpf.WebView2 to Microsoft.Web.WebView2.Wpf.WebView2CompositionControl.

  1. Problem with Blazor WPF Hybrid is that during the initialization phase it doesn't show the index.html loading from Blazor. Just blank screen. If you downgrade to v9 you won't have this problem. Also latest winform control doesn't have this problem.
  2. Second problem, if you won't WebView2CompositionControl dispose the control explicitly, and Blazor will send IPC the control will throw that WebView was is "WebView2 control is Disposed" exception propagating to apps unhandled exception. You can download the repro here "WebView2 control is Disposed" exception, close the app during "loading" and see "WebView2 control is Disposed", if you downgrade to v9 it will no happen, it will throw another exception that is not related to this problem
Importance

Important. My app's user experience is significantly compromised.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

No response

SDK Version

No response

Framework

WPF

Operating System

Windows 11

OS Version

10.0.26200 Build 26200

Repro steps

After upgrading Microsoft.AspNetCore.Components.WebView.Wpf from 9.0.120 to 10.0.51, which switches the underlying control from Microsoft.Web.WebView2.Wpf.WebView2 to Microsoft.Web.WebView2.Wpf.WebView2CompositionControl, the following issues occur:

  1. During initialization, the Blazor WPF Hybrid app does not render loading coming from index.html and shows a blank screen instead. Downgrading back to v9 resolves the issue. The latest WinForms control does not exhibit this behavior.

  2. If WebView2CompositionControl is not explicitly disposed and Blazor sends IPC messages afterward, the control throws a "WebView2 control is disposed" exception, which propagates as an unhandled exception in the application.
    Steps to reproduce:
    https://github.com/ScarletKuro/WpfIssueThreading

    • Run the sample app
    • Close the app while it is still loading
    • Observe the "WebView2 control is disposed" exception

    When using v9, this issue does not occur. A different exception will be thrown, but it is unrelated to this problem (it's another one related to aspnetcore).

An argument that controls should be disposed will be valid, but before was better, and it's weird that it acts like this when the window that owned the control doesn't even exist anymore.

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

Was fine with WebView2, but seems WebView2CompositionControl behaving differently.

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.