Skip to content

[Problem/Bug]: Error on initialization using WebView2CompositionControl on .net core 8.0 on a shared project #5169

Open
@vnoves

Description

@vnoves

What happened?

I have a shared project with a WPF with a WebView2CompositionControl, on a project with .net framework 4.5 everything works but then loading the WPF on a .net core 8.0 project I get the following on initialization of the WPF:

Could not load type 'Microsoft.Web.WebView2.Wpf.WebView2CompositionControl' from assembly 'Microsoft.Web.WebView2.Wpf, Version=1.0.2045.28, Culture=neutral, PublicKeyToken=2a8ab48044d2601e'.

Importance

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

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

1.0.3124.44

SDK Version

No response

Framework

WPF

Operating System

Windows 11

OS Version

26100.3476

Repro steps

Create a WPF with a WebView2CompositionControl in a shared project. Call that shared project from a .net core project, and it will throw an error when initializing. I tried all the versions where WebView2CompositionControl is available and had the same issue

Repros in Edge Browser

Yes, issue can be reproduced in the corresponding Edge version

Regression

No, this never worked

Last working version (if regression)

No response

Metadata

Metadata

Assignees

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