Skip to content
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

Unable to cast to Microsoft.Web.WebView2.Core.Raw.ICoreWebView2Environment10. #86

Open
crazylin opened this issue Aug 9, 2024 · 1 comment

Comments

@crazylin
Copy link

crazylin commented Aug 9, 2024

var options = new CoreWebView2EnvironmentOptions();
var environment = await CoreWebView2Environment.CreateAsync(string.Empty, userDataFolder, options);
var controllerOptions = environment.CreateCoreWebView2ControllerOptions();

Unable to cast to Microsoft.Web.WebView2.Core.Raw.ICoreWebView2Environment10.
This may happen if you are using an interface not supported by the version of the WebView2 Runtime you are using.
For instance, if you are using an experimental interface from an older SDK that has been modified or removed in a newer runtime.
Or, if you are using a public interface from a newer SDK that wasn't implemented in an older runtime.
For more information about WebView2 versioning please visit the following: https://learn.microsoft.com/microsoft-edge/webview2/concepts/versioning

Microsoft.Web.WebView2 Version="1.0.2592.51"

@crazylin crazylin changed the title System.NotImplementedException:“Unable to cast to Microsoft.Web.WebView2.Core.Raw.ICoreWebView2Environment10. Unable to cast to Microsoft.Web.WebView2.Core.Raw.ICoreWebView2Environment10 Aug 9, 2024
@crazylin crazylin changed the title Unable to cast to Microsoft.Web.WebView2.Core.Raw.ICoreWebView2Environment10 Unable to cast to Microsoft.Web.WebView2.Core.Raw.ICoreWebView2Environment10. Aug 9, 2024
@JoemanCXL
Copy link

JoemanCXL commented Sep 6, 2024

I've recently had the same issue. I have two applications, one .NET Framework, one .NET. The .NET one seems to work fine with the same library version (both reference Microsoft.Web.WebView2 1.0.2651.64) but the .NET Framework code base fails with the same message on the same method.

The ICoreWebView2Environment10 interface is not exactly new so I doubt this is due to using some preview release. I can confirm that the .NET Framework code base that fails now worked a few weeks ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants