Skip to content

[Problem/Bug]: How to properly use AddBrowserExtensionAsync in UWP with WebView2? #5040

Open
@Vict0r-Chen

Description

What happened?

I am trying to use the AddBrowserExtensionAsync method in a UWP application with WebView2, but I am encountering issues. According to the Microsoft documentation, it seems that this method should allow me to add browser extensions to the WebView2 control. However, I am not able to get it working as expected.

Importance

Moderate. My app's user experience is affected, but still usable.

Runtime Channel

Stable release (WebView2 Runtime), Prerelease (Edge Canary/Dev/Beta)

Runtime Version

131.0.2903.112

SDK Version

1.0.2903.40

Framework

WinUI2/UWP

Operating System

Windows 10, Windows 11

OS Version

23H2

Repro steps

Steps to Reproduce:

Set up a UWP project with WebView2.

Attempt to use the AddBrowserExtensionAsync method to add a browser extension.

Observe that the extension is not loaded or the method throws an exception.

Expected Behavior:
The AddBrowserExtensionAsync method should successfully add the specified browser extension to the WebView2 control.

Actual Behavior:
The extension is not loaded, or the method throws an exception (please specify the exception if any).

Additional Information:

WebView2 SDK Version: [Insert version here]

UWP Target Version: [Insert version here]

OS Version: [Insert version here]

Any relevant code snippets or error messages.

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

No, this never worked

Last working version (if regression)

N/A

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions