Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
vnoves opened this issue Mar 18, 2025 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@vnoves
Copy link

vnoves commented Mar 18, 2025

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

@vnoves vnoves added the bug Something isn't working label Mar 18, 2025
@vnoves vnoves changed the title [Problem/Bug]: [Problem/Bug]: Error on initialization using WebView2CompositionControl on .net core 8.0 on a shared project Mar 18, 2025
@vnoves
Copy link
Author

vnoves commented Mar 19, 2025

I tried on a regular project (not a shared one) and I'm encountering the same issue

@Navdeep-ss
Copy link

@vnoves Can you share a small sample project where you encounter this error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants