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

Improving how WebView2 runtime is detected #2090

Merged
merged 1 commit into from
Dec 23, 2021
Merged

Improving how WebView2 runtime is detected #2090

merged 1 commit into from
Dec 23, 2021

Conversation

lubos
Copy link
Contributor

@lubos lubos commented Dec 21, 2021

WebView2 runtime no longer creates required registry keys unless it's installed by administrator.

MicrosoftEdge/WebView2Feedback#2030

This commit changes how WebView2 runtime is detected so instead of registry keys we simply call new GetAvailableBrowserVersionString method.

@cwensley
Copy link
Member

Hey @lubos thanks for the PR!

Well that is rather annoying that they changed how it is detected. Is this new method available on the old versions of WebView2? E.g. would it fail if they had an older version of the webview2 runtime installed, or just simply get them to install the new version?

As for the failure, it's due to MS breaking API's on their Xamarin.Mac/macos stuff for .NET 6 so no worries about that one. I'll have to resolve it to get nuget packages out though.

@lubos
Copy link
Contributor Author

lubos commented Dec 21, 2021

would it fail if they had an older version of the webview2 runtime installed, or just simply get them to install the new version?

I see. We could test if registry keys are present and if not, only then check what GetAvailableBrowserVersionString function returns. That would be safe approach but I think this should be a job of GetAvailableBrowserVersionString function to check registry keys to be backwards compatible if needed. We should just call GetAvailableBrowserVersionString and not worry about registry checking at all. Microsoft docs say we can either do registry check or this function. It doesn't say we should do both so I think we shouldn't.

I'm happy to use pre-release nuget of Eto.Forms and run this approach in production. From my limited testing, GetAvailableBrowserVersionString is enough.

@cwensley cwensley merged commit 1e8142d into picoe:develop Dec 23, 2021
@cwensley
Copy link
Member

Looks like it'll just work as this is part of the helper library that you distribute with your app, not the installed runtime.

Thanks for the PR! A fresh CI pre-release nuget should be ready soon.

@cwensley cwensley added the bug label Dec 23, 2021
@cwensley cwensley added this to the 2.6.1 milestone Dec 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants