简体   繁体   English

UWP WebView2 无法与安装的 WebView2 运行时一起使用

[英]UWP WebView2 not working with WebView2 Runtime installed

I've created a WinUI 3.0 UWP application and installed the WebView2 runtime as per documentation .我已经创建了一个 WinUI 3.0 UWP 应用程序并按照文档安装了 WebView2 运行时。 When I inspect the regkey and its pv property, per documentation , it is set.当我根据文档检查 regkey 及其 pv 属性时,它已设置。 However, when launching my app, regardless of in debug or release, I see the A suitable version of Microsoft Edge was not detected但是,在启动我的应用程序时,无论是在调试还是发布中,我都看到未检测到合适的 Microsoft Edge 版本

The XML itself is extremely simple: XML 本身非常简单:

<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:该文档指出,也应该可以依赖 WebView2 运行时进行开发:

During development and testing, you may use either as the backing web platform.在开发和测试过程中,您可以使用任一作为支持 Web 平台。

  • The WebView2 Runtime WebView2 运行时
  • Any Insider (non-stable) Microsoft Edge (Chromium) browser channel任何 Insider(不稳定)Microsoft Edge (Chromium) 浏览器频道

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 .有没有人在不直接安装 Microsoft Edge 的 BETA 版本的情况下设法运行它,因为这不是一个选项,也不推荐

See the prerequisites in Getting started with WebView2 in WinUI 3请参阅WinUI 3 中的 WebView2 入门中的先决条件

Introduction to Microsoft Edge WebView2 Microsoft Edge WebView2 简介

To see which version of MS Edge is required for a particular version of WebView2, see the WebView2 Release Notes .要查看特定版本的 WebView2 需要哪个版本的 MS Edge,请参阅WebView2 发行说明

Download the latest development build of MS Edge from https://www.microsoftedgeinsider.com/en-us/download .https://www.microsoftedgeinsider.com/en-us/download下载 MS Edge 的最新开发版本。

The following post shows some things that you can check to determine the MS Edge version(s) you have installed.以下帖子显示了您可以检查以确定已安装的 MS Edge 版本的一些内容。How to detect if runtime is installed?如何检测是否安装了运行时?#421第421章

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM