问题
I've created a WinUI 3.0 UWP application and installed the WebView2 runtime as per documentation. When I inspect the regkey and its pv property, per documentation, it is set. However, when launching my app, regardless of in debug or release, I see the A suitable version of Microsoft Edge was not detected
The XML itself is extremely simple:
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<controls:WebView2 x:Name="MyWebView" Grid.Row="1" Grid.ColumnSpan="2"
Source="https://www.microsoft.com" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
The documentation states that it should be possible to rely on the WebView2 runtime for development as well:
During development and testing, you may use either as the backing web platform.
- The WebView2 Runtime
- Any Insider (non-stable) Microsoft Edge (Chromium) browser channel
Have anyone managed to get this running without installing a BETA release of Microsoft Edge directly as this is not an option nor is it recommended.
回答1:
See the prerequisites in Getting started with WebView2 in WinUI 3
Introduction to Microsoft Edge WebView2
To see which version of MS Edge is required for a particular version of WebView2, see the WebView2 Release Notes.
Download the latest development build of MS Edge from https://www.microsoftedgeinsider.com/en-us/download.
The following post shows some things that you can check to determine the MS Edge version(s) you have installed. How to detect if runtime is installed? #421
来源:https://stackoverflow.com/questions/64703071/uwp-webview2-not-working-with-webview2-runtime-installed