Skip to content

chore: remove Microsoft.Web.WebView2 backend - #23757

Merged
jonpryor merged 1 commit into
feature/breakingchangesfrom
dev/jonpryor/jonp-Windows-remove-Microsoft.Web.WebView2
Jul 15, 2026
Merged

jonpryor merged 1 commit into
feature/breakingchangesfrom
dev/jonpryor/jonp-Windows-remove-Microsoft.Web.WebView2

Conversation

@jonpryor

Copy link
Copy Markdown
Contributor

Context: #23621
Context: #23603

PR #23621 added a WebView2Aot backend for <WebView2/> within Uno.UI.Runtime.Skia.Win32, and added support for a UNO_WEBVIEW2_BACKEND environment variable to switch between the backends.

For Uno 7, remove support for the original Microsoft.Web.WebView2 backend. We'll stick with WebView2Aot going forward, which will reduce assembly size (only one backend), simplify maintenance (only one backend), and has support for Native AOT.

Additionally, as the feature/breakingchanges branch is now on .NET 11 (#23603), which drops support for .NET 9, we no longer need to make the WebView2Aot NuGet reference conditional on .NET 10+. Cleanup Uno.UI.Runtime.Skia.Win32 accordingly.

PR Type:

🔄 Refactoring (no functional changes, no api changes)

What changed? 🚀

PR Checklist ✅

@jonpryor
jonpryor force-pushed the dev/jonpryor/jonp-Windows-remove-Microsoft.Web.WebView2 branch from c3b2ef5 to 9825299 Compare July 14, 2026 14:11
@jonpryor
jonpryor requested review from Copilot and ramezgerges July 14, 2026 14:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes the legacy Microsoft.Web.WebView2-based Win32 backend from Uno.UI.Runtime.Skia.Win32 and standardizes on the WebView2Aot backend going forward (aligned with the repo’s move to net10/net11). This reduces maintenance surface and simplifies the runtime package’s dependency set.

Changes:

  • Removed the Microsoft.Web.WebView2 backend implementation (including its WebResourceRequested wrappers) and the microsoft.web.webview2 switch option.
  • Simplified the Win32 WebView provider logic to only create the WebView2Aot-based implementation.
  • Updated WebView documentation to reflect backend availability changes (but it still contains legacy-backend guidance that should be removed/updated).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/Uno.UI.Runtime.Skia.Win32/Uno.UI.Runtime.Skia.Win32.csproj Drops legacy WebView2 package references and makes WebView2Aot unconditional (net10/net11).
src/Uno.UI.Runtime.Skia.Win32/UI/Xaml/Controls/WebView/Win32NativeWebView.WebResourceRequested.cs Deletes legacy backend WebResourceRequested adapter types.
src/Uno.UI.Runtime.Skia.Win32/UI/Xaml/Controls/WebView/Win32NativeWebView.cs Removes legacy-backend selection and defaults to the AOT backend only.
doc/articles/controls/WebView.md Updates backend documentation, but still includes instructions for the removed backend/value.
Comments suppressed due to low confidence (1)

src/Uno.UI.Runtime.Skia.Win32/UI/Xaml/Controls/WebView/Win32NativeWebView.cs:5

  • After removing the legacy backend implementation, most of the using directives in this file are now unused (e.g., System.Drawing, System.IO, Windows.Storage, Windows.Win32). Cleaning them up avoids analyzer noise and makes the provider easier to read.
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Net.Http;

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread doc/articles/controls/WebView.md Resolved
@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 222330 found UI Test snapshots differences: skia-linux-screenshots: 68, skia-windows-screenshots: 84

Details
  • skia-linux-screenshots: 68 changed over 2368

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ClipboardTests.png-dark
    • ClipboardTests.png
    • Gamepad_CurrentReading.png-dark
    • CornerRadiusControls.png
    • Focus_FocusVisual_Properties.png-dark
    • DropDownButtonPage.png-dark
    • Gamepad_Enumeration.png-dark
    • ImageBrushInList.png-dark
    • ImageBrushInList.png
    • CompositionPath.png
    • Image_Margin_Large.png
    • DoubleImageBrushInList.png-dark
    • DoubleImageBrushInList.png
    • EllipsemaskingEllipseGrid.png
    • Examples.png-dark
    • Examples.png
    • ExpanderColorValidationPage.png-dark
    • Buttons.png-dark
    • Buttons.png
    • ColorPickerSample.png
  • skia-windows-screenshots: 84 changed over 2368

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • DropDownButtonPage.png-dark
    • ButtonClippingTestsControl.png-dark
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • Basics Pivot Test.png
    • Focus_FocusVisual_Properties.png-dark
    • ButtonClippingTestsControl.png
    • Examples.png
    • ExpanderColorValidationPage.png-dark
    • Buttons.png-dark
    • Buttons.png
    • ClipboardTests.png-dark
    • Gamepad_CurrentReading.png-dark
    • Image_AnimatedWebP.png-dark
    • Image_UseTargetSize.png
    • ColorPickerSample.png-dark
    • DoubleImageBrushInList.png-dark
    • DoubleImageBrushInList.png
    • DisplayInformation.png-dark
    • DynamicFont.png

Context: #23621
Context: #23603

PR #23621 added a WebView2Aot backend for `<WebView2/>` within
`Uno.UI.Runtime.Skia.Win32`, and added support for a
`UNO_WEBVIEW2_BACKEND` environment variable to switch between the
backends.

For Uno 7, remove support for the original Microsoft.Web.WebView2
backend.  We'll stick with WebView2Aot going forward, which will
reduce assembly size (only one backend), simplify maintenance
(only one backend), and has support for Native AOT.

Additionally, as the feature/breakingchanges branch is now on .NET 11
(#23603), which drops support for .NET 9, we no longer need to make
the WebView2Aot NuGet reference conditional on .NET 10+.
Cleanup `Uno.UI.Runtime.Skia.Win32` accordingly.
@jonpryor
jonpryor force-pushed the dev/jonpryor/jonp-Windows-remove-Microsoft.Web.WebView2 branch from 9825299 to 72c5e4a Compare July 15, 2026 17:38
@jonpryor
jonpryor enabled auto-merge July 15, 2026 17:38
@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 222523 found UI Test snapshots differences: skia-linux-screenshots: 65, skia-windows-screenshots: 91

Details
  • skia-linux-screenshots: 65 changed over 2368

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Buttons.png-dark
    • Buttons.png
    • Gamepad_Enumeration.png-dark
    • ElementLevelTheme.png-dark
    • Image_AnimatedWebP.png-dark
    • Image_AnimatedWebP.png
    • ClipboardTests.png-dark
    • ClipboardTests.png
    • EllipsemaskingEllipseGrid.png
    • ImageIconPage.png-dark
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • Examples.png-dark
    • Examples.png
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • DropDownButtonPage.png-dark
    • Gamepad_CurrentReading.png-dark
    • DisplayInformation.png-dark
    • ImageBrushInList.png-dark
  • skia-windows-screenshots: 91 changed over 2368

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Examples.png
    • ExpanderColorValidationPage.png-dark
    • Gamepad_Enumeration.png-dark
    • ButtonClippingTestsControl.png-dark
    • ColorPickerSample.png-dark
    • ColorPickerSample.png
    • DropDownButtonPage.png-dark
    • DropDownButtonPage.png
    • ClipboardTests.png-dark
    • DoubleImageBrushInList.png-dark
    • DoubleImageBrushInList.png
    • DisplayInformation.png-dark
    • Focus_FocusVisual_Properties.png-dark
    • Focus_FocusVisual_Properties.png
    • ButtonClippingTestsControl.png
    • Buttons.png-dark
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • ImageBrushInList.png-dark
    • ImageBrushInList.png

@jonpryor
jonpryor merged commit 907f617 into feature/breakingchanges Jul 15, 2026
68 checks passed
@jonpryor
jonpryor deleted the dev/jonpryor/jonp-Windows-remove-Microsoft.Web.WebView2 branch July 15, 2026 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants