问题描述
我已经创建了一个 WinUI 3.0 UWP 应用程序并按照 文档.当我检查 regkey 及其 pv 属性时,根据 文档,它被设置.但是,在启动我的应用程序时,无论是在调试还是发布中,我都看到未检测到合适的 Microsoft Edge 版本
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
XML 本身非常简单:
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" />
文档指出,也应该可以依赖 WebView2 运行时进行开发:
The documentation states that it should be possible to rely on the WebView2 runtime for development as well:
在开发和测试过程中,您可以使用任一网络平台作为支持.
- WebView2 运行时
- 任何 Insider(不稳定)Microsoft Edge (Chromium) 浏览器频道
是否有人设法在不直接安装 Microsoft Edge BETA 版本的情况下运行它,因为这不是一个选项,也不是 推荐.
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.
推荐答案
要查看特定版本的 WebView2 需要哪个版本的 MS Edge,请参阅 WebView2 发行说明.
To see which version of MS Edge is required for a particular version of WebView2, see the WebView2 Release Notes.
从 https://www.microsoftedgeinsider.com/下载 MS Edge 的最新开发版本zh-cn/下载.
以下帖子显示了您可以检查以确定已安装的 MS Edge 版本的一些内容.如何检测是否安装了运行时?#421
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
这篇关于UWP WebView2 无法与安装的 WebView2 运行时一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!