From e4489df709895b4d1657e284c52ae22135719976 Mon Sep 17 00:00:00 2001 From: Michael Hoffman Date: Fri, 9 Feb 2024 12:25:11 -0800 Subject: [PATCH 01/61] Article stubs & toc entries --- microsoft-edge/toc.yml | 13 +++++++--- .../webview2/how-to/prerelease-testing.md | 25 +++++++++++++++++++ .../webview2/how-to/self-hosting.md | 23 +++++++++++++++++ 3 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 microsoft-edge/webview2/how-to/prerelease-testing.md create mode 100644 microsoft-edge/webview2/how-to/self-hosting.md diff --git a/microsoft-edge/toc.yml b/microsoft-edge/toc.yml index e8231b5aff..b36953bd27 100644 --- a/microsoft-edge/toc.yml +++ b/microsoft-edge/toc.yml @@ -1305,13 +1305,20 @@ items: - name: Test upcoming APIs and features href: webview2/how-to/set-preview-channel.md - + + - name: Prerelease testing + href: webview2/how-to/prerelease-testing.md + - name: Use Playwright to automate and test in WebView2 href: webview2/how-to/playwright.md - + - name: Automate and test WebView2 apps with Microsoft Edge WebDriver href: webview2/how-to/webdriver.md - + + - name: Self-hosting # todo: move this TOC entry + href: webview2/how-to/self-hosting.md + + # ----------------------------------------------------------------------------- - name: Debug WebView2 apps items: diff --git a/microsoft-edge/webview2/how-to/prerelease-testing.md b/microsoft-edge/webview2/how-to/prerelease-testing.md new file mode 100644 index 0000000000..0f8e5c8941 --- /dev/null +++ b/microsoft-edge/webview2/how-to/prerelease-testing.md @@ -0,0 +1,25 @@ +--- +title: Prerelease testing +description: Prerelease testing. +author: MSEdgeTeam +ms.author: msedgedevrel +ms.topic: conceptual +ms.service: microsoft-edge +ms.subservice: webview +ms.date: 02/09/2024 +--- +# Prerelease testing + + + +## Heading + + + +#### Subheading + + + +## See also + +* [Test upcoming APIs and features](./set-preview-channel.md) diff --git a/microsoft-edge/webview2/how-to/self-hosting.md b/microsoft-edge/webview2/how-to/self-hosting.md new file mode 100644 index 0000000000..efa69f5c44 --- /dev/null +++ b/microsoft-edge/webview2/how-to/self-hosting.md @@ -0,0 +1,23 @@ +--- +title: Self-hosting +description: Self-hosting. +author: MSEdgeTeam +ms.author: msedgedevrel +ms.topic: conceptual +ms.service: microsoft-edge +ms.subservice: webview +ms.date: 02/09/2024 +--- +# Self-hosting + + + +## Heading + + + +#### Subheading + + + +## See also From a8964c09c1c261c463d178955b85ab2db1ea0535 Mon Sep 17 00:00:00 2001 From: Michael Hoffman Date: Fri, 9 Feb 2024 12:27:45 -0800 Subject: [PATCH 02/61] flag existing article needing update --- microsoft-edge/webview2/how-to/set-preview-channel.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/microsoft-edge/webview2/how-to/set-preview-channel.md b/microsoft-edge/webview2/how-to/set-preview-channel.md index 354a447140..def95013ce 100644 --- a/microsoft-edge/webview2/how-to/set-preview-channel.md +++ b/microsoft-edge/webview2/how-to/set-preview-channel.md @@ -6,10 +6,14 @@ ms.author: msedgedevrel ms.topic: conceptual ms.service: microsoft-edge ms.subservice: webview -ms.date: 02/24/2023 +ms.date: 02/09/2024 --- # Test upcoming APIs and features - + + + From 9e718a94bb813e81f7f9cffd11600e3d5fa586df Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Tue, 13 Feb 2024 16:43:01 -0800 Subject: [PATCH 03/61] Initial commit of edits for pre-release testing --- .../webview2/how-to/prerelease-testing.md | 100 +++++++++++++++++- 1 file changed, 97 insertions(+), 3 deletions(-) diff --git a/microsoft-edge/webview2/how-to/prerelease-testing.md b/microsoft-edge/webview2/how-to/prerelease-testing.md index 0f8e5c8941..041838bac6 100644 --- a/microsoft-edge/webview2/how-to/prerelease-testing.md +++ b/microsoft-edge/webview2/how-to/prerelease-testing.md @@ -10,13 +10,107 @@ ms.date: 02/09/2024 --- # Prerelease testing +Prerelease testing helps apps catch bugs in prerelease channels of WebView2, before they ship in a stable release and degrade the app experience for end users. This document provide guiding principles and tools to help partners get started. -## Heading +#### What is prerelease testing? +Prerelease testing means validating your app against early builds of WebView2 to ensure that your app works with upcoming changes. This can be accomplished through automated testing and flighting with Edge preview channels, which contain the WebView2 prerelease bits. The [Edge preview channels](https://learn.microsoft.com/en-us/deployedge/microsoft-edge-channels) consist of Canary (daily), Dev (weekly), and Beta (every 4 weeks). + +#### Why is prerelease testing important? +Evergreen WebView2 is based on the evergreen Chromium platform that receives monthly major updates. Testing against prerelease channels is the de facto way for web developers to validate their apps against incoming browser updates for the past decade and more. A common discovery from investigations that we have conducted in the past year, is that we regression tends to be application specific. WebView2 is tested in a variety of scenarios, but it is impossible to cover all the scenarios that an app might encounter. This means that the only way to catch certain app specific regressions before it ships to stable is to test against prerelease channels. + +Some examples of the issues that could have been caught prior to stable prerelease testing include: +- [Unable to open https://www.facebook.com, once load will directly ProcessFailed](https://github.com/MicrosoftEdge/WebView2Feedback/issues/4281) +- [MSEdgeWebView2 crashes when trying to preview a file through Monaco in file explorer using PowerToys](https://github.com/MicrosoftEdge/WebView2Feedback/issues/4228) +- [CoreWebView2PrintSettings.ScaleFactor is not working](https://github.com/MicrosoftEdge/WebView2Feedback/issues/4082) + +#### How to get started with prerelease testing? + +We highly recommend that you start with automated testing against the Edge Canary channel, which ships daily, to catch issues as early as possible. Edge Dev that ships weekly is also a good option. + +##### Tooling and Guidance + +###### How to set preview channel + +**Option 1: Channel Search Kind** + +The channel search kind controls the default channel search order. By default, the WebView2 loader searches for binaries from most to least stable, using the first one found: + +``` +WebView2 Runtime (Stable) -> Edge Beta -> Edge Dev -> Edge Canary +``` + +To perform prerelease testing, you can reverse the channel search order so that the loader looks for the least stable build first: + +``` +Edge Canary -> Edge Dev -> Edge Beta -> WebView2 Runtime (Stable) +``` + +The channel search kind can be set per app through the registry key, environment variable, API or group policy. + +#### [Registry Key](#tab/registry-key) + +```reg +REG ADD \Software\Policies\Microsoft\Edge\WebView2\ChannelSearchKind /v WebView2APISample.exe /t REG_DWORD /d 1 +``` + +Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. The value 1 indicates reversed search order. + +#### [Environment variable](#tab/environment-variable) + +Name: `WEBVIEW2_CHANNEL_SEARCH_KIND` +Value: `1` + +The value `1` indicates reversed search order. + +#### [API (experimental)](#tab/api) + +By default, the [ChannelSearchKind](https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2experimentalenvironmentoptions?view=webview2-1.0.2357-prerelease#get_channelsearchkind) on `ICoreWebView2EnvironmentOptions` is `COREWEBVIEW2_CHANNEL_SEARCH_KIND_MOST_STABLE`. Set this property to `COREWEBVIEW2_CHANNEL_SEARCH_KIND_LEAST_STABLE` to reverse the search order. + +#### [Group Policy](#tab/group-policy) + +Set the `ChannelSearchKind` policy. + +Name: `` +Value: `1` + +Download the Edge policy files, which include the WebView2 policy files, from the [Edge Enterprise](https://www.microsoft.com/en-us/edge/business/download?form=MA13FJ) site , or use the built-in policy on Intune. + +--- + +**Option 2: Browser Executable Folder** + +The browser executable folder is the path to the folder that contains the WebView2 Runtime binaries. This option is useful if you are using a fixed Runtime. It can be set per app through a registry key, environment variable, API, or group policy. + +#### [Registry Key](#tab/registry-key) + +```reg +REG ADD \Software\Policies\Microsoft\Edge\WebView2\BrowserExecutableFolder /v WebView2APISample.exe /t REG_SZ /d "C:\Users\myname\AppData\Local\Microsoft\Edge SxS\Application\88.0.680.0" +``` + +Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. Replace the sample path with the path to the desired Microsoft Edge preview channel. + +#### [Environment variable](#tab/environment-variable) + +Name: `WEBVIEW2_BROWSER_EXECUTABLE_FOLDER` +Value: `` + +#### [API](#tab/api) + +Pass the path to the browser executable folder during environment creation with `CreateCoreWebView2EnvironmentWithOptions`. + +#### [Group Policy](#tab/group-policy) + +Set `BrowserExecutableFolder` + +Name: `` +Value: `` + +Download the Edge policy files, which include the WebView2 policy files, from the Edge Enterprise site , or use the built-in policy on Intune. + +--- - -#### Subheading From f63ea9627c58343ecf33d3904788d516a5320f86 Mon Sep 17 00:00:00 2001 From: Michael Hoffman Date: Tue, 13 Feb 2024 22:37:55 -0800 Subject: [PATCH 04/61] Writer/Editor pass on prerelease-testing.md --- .../webview2/how-to/prerelease-testing.md | 127 +++++++++++++----- .../webview2/how-to/set-preview-channel.md | 2 +- 2 files changed, 94 insertions(+), 35 deletions(-) diff --git a/microsoft-edge/webview2/how-to/prerelease-testing.md b/microsoft-edge/webview2/how-to/prerelease-testing.md index 041838bac6..5075732f9f 100644 --- a/microsoft-edge/webview2/how-to/prerelease-testing.md +++ b/microsoft-edge/webview2/how-to/prerelease-testing.md @@ -1,6 +1,6 @@ --- -title: Prerelease testing -description: Prerelease testing. +title: Prerelease testing using the preview channels of Microsoft Edge +description: Test your WebView2 app by using the preview channels of Microsoft Edge (Edge Canary, Edge Dev, or Edge Beta) to find issues that will affect your particular WebView2 app, before WebView2 changes migrate to Edge Stable. author: MSEdgeTeam ms.author: msedgedevrel ms.topic: conceptual @@ -8,112 +8,171 @@ ms.service: microsoft-edge ms.subservice: webview ms.date: 02/09/2024 --- -# Prerelease testing +# Prerelease testing using the preview channels of Microsoft Edge + +_Prerelease testing_ means testing your WebView2 app by using the preview channels of Microsoft Edge (Edge Canary, Edge Dev, or Edge Beta) to find issues that will affect your particular WebView2 app, before WebView2 changes migrate to Edge Stable. + +Prerelease testing helps apps catch bugs in prerelease channels of WebView2, before the WebView2 changes ship in a stable release and degrade the app experience for end users. + +Prerelease testing means validating your app against early builds of WebView2 to ensure that your app works with upcoming changes. This can be accomplished through automated testing and flighting with the preview channels of Microsoft Edge, which contain the WebView2 prerelease bits. The preview (or "insider") channels of Microsoft Edge consist of: +* Edge Canary - releases daily. +* Edge Dev - releases weekly. +* Edge Beta - releases every 4 weeks. + +See also: +* [Overview of the Microsoft Edge channels](/deployedge/microsoft-edge-channels) +* [Become a Microsoft Edge Insider](https://www.microsoft.com/edge/download/insider) - download Edge Canary, Edge Dev, or Edge Beta -Prerelease testing helps apps catch bugs in prerelease channels of WebView2, before they ship in a stable release and degrade the app experience for end users. This document provide guiding principles and tools to help partners get started. -#### What is prerelease testing? -Prerelease testing means validating your app against early builds of WebView2 to ensure that your app works with upcoming changes. This can be accomplished through automated testing and flighting with Edge preview channels, which contain the WebView2 prerelease bits. The [Edge preview channels](https://learn.microsoft.com/en-us/deployedge/microsoft-edge-channels) consist of Canary (daily), Dev (weekly), and Beta (every 4 weeks). +## Importance of prerelease testing -#### Why is prerelease testing important? -Evergreen WebView2 is based on the evergreen Chromium platform that receives monthly major updates. Testing against prerelease channels is the de facto way for web developers to validate their apps against incoming browser updates for the past decade and more. A common discovery from investigations that we have conducted in the past year, is that we regression tends to be application specific. WebView2 is tested in a variety of scenarios, but it is impossible to cover all the scenarios that an app might encounter. This means that the only way to catch certain app specific regressions before it ships to stable is to test against prerelease channels. +Evergreen WebView2 is based on the evergreen Chromium platform, which receives monthly major updates. Testing against prerelease channels (Edge Canary, Edge Dev, or Edge Beta) is the way to validate your own, particular app against incoming browser updates. Regressions in WebView2 apps tend to be application-specific, rather than affecting all WebView2 apps. -Some examples of the issues that could have been caught prior to stable prerelease testing include: +The only way to catch app-specific regressions before WebView2 changes ship in Edge Stable is to test your particular app against the prerelease channels of Microsoft Edge. WebView2 is tested in a variety of general scenarios, but it's not feasible for that general testing to cover all the scenarios that various specific apps might encounter. + +Many issues in specific WebView2 apps can be discovered before WebView2 changes reach Edge Stable by doing prerelease testing (such as in Edge Canary). For example, the following issues have been caught: - [Unable to open https://www.facebook.com, once load will directly ProcessFailed](https://github.com/MicrosoftEdge/WebView2Feedback/issues/4281) - [MSEdgeWebView2 crashes when trying to preview a file through Monaco in file explorer using PowerToys](https://github.com/MicrosoftEdge/WebView2Feedback/issues/4228) - [CoreWebView2PrintSettings.ScaleFactor is not working](https://github.com/MicrosoftEdge/WebView2Feedback/issues/4082) -#### How to get started with prerelease testing? -We highly recommend that you start with automated testing against the Edge Canary channel, which ships daily, to catch issues as early as possible. Edge Dev that ships weekly is also a good option. + +## Start prerelease testing by doing automated testing against Edge Canary + +Start with automated testing against the Microsoft Edge **Canary** channel, which ships daily. This enables you to catch issues as early as possible. To test your app against Edge Canary, you set the preview channel, as described below. -##### Tooling and Guidance +The Microsoft Edge **Dev** channel ships weekly, and is also a good option. -###### How to set preview channel -**Option 1: Channel Search Kind** + +## Ways to set the preview channel -The channel search kind controls the default channel search order. By default, the WebView2 loader searches for binaries from most to least stable, using the first one found: +You can set the preview channel by doing either of the following: +* Use `ChannelSearchKind` to set the channel search order. +* Use the browser executable folder. + +These options are explained below. + + + +## Setting the preview channel by using ChannelSearchKind to set the channel search order + +The channel search kind controls the default channel search order. By default, the WebView2 loader searches for binaries from most-stable to least-stable (Canary), using the first binary that's found: ``` WebView2 Runtime (Stable) -> Edge Beta -> Edge Dev -> Edge Canary ``` -To perform prerelease testing, you can reverse the channel search order so that the loader looks for the least stable build first: +To do prerelease testing, reverse the channel search order, so that the loader looks for binaries in order from least-stable (Canary) to most-stable: ``` Edge Canary -> Edge Dev -> Edge Beta -> WebView2 Runtime (Stable) ``` -The channel search kind can be set per app through the registry key, environment variable, API or group policy. +The channel search kind can be set per app through a registry key, environment variable, API, or group policy. + +The value `1` indicates reversed search order; that is, from least-stable (Edge Canary) to most-stable. -#### [Registry Key](#tab/registry-key) +#### [Registry key](#tab/registry-key) ```reg REG ADD \Software\Policies\Microsoft\Edge\WebView2\ChannelSearchKind /v WebView2APISample.exe /t REG_DWORD /d 1 ``` -Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. The value 1 indicates reversed search order. +Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. + #### [Environment variable](#tab/environment-variable) Name: `WEBVIEW2_CHANNEL_SEARCH_KIND` Value: `1` -The value `1` indicates reversed search order. +#### [API](#tab/api) + +By default, the `CoreWebView2EnvironmentOptions.ChannelSearchKind` property is `CoreWebView2ChannelSearchKind.MostStable` (an enum value). Instead, reverse the search order by setting the `CoreWebView2EnvironmentOptions.ChannelSearchKind` property to `CoreWebView2ChannelSearchKind.LeastStable`. -#### [API (experimental)](#tab/api) +.NET: +* [CoreWebView2EnvironmentOptions.ChannelSearchKind Property](https://learn.microsoft.com/dotnet/api/microsoft.web.webview2.core.corewebview2environmentoptions.channelsearchkind) +* [CoreWebView2ChannelSearchKind Enum](https://learn.microsoft.com/dotnet/api/microsoft.web.webview2.core.corewebview2channelsearchkind) -By default, the [ChannelSearchKind](https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2experimentalenvironmentoptions?view=webview2-1.0.2357-prerelease#get_channelsearchkind) on `ICoreWebView2EnvironmentOptions` is `COREWEBVIEW2_CHANNEL_SEARCH_KIND_MOST_STABLE`. Set this property to `COREWEBVIEW2_CHANNEL_SEARCH_KIND_LEAST_STABLE` to reverse the search order. +WinRT: +* [CoreWebView2EnvironmentOptions.ChannelSearchKind Property](https://learn.microsoft.com/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2environmentoptions#channelsearchkind) +* [CoreWebView2ChannelSearchKind Enum](https://learn.microsoft.com/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2channelsearchkind) -#### [Group Policy](#tab/group-policy) +Win32: +* [ICoreWebView2ExperimentalEnvironmentOptions::get_ChannelSearchKind](https://learn.microsoft.com/microsoft-edge/webview2/reference/win32/icorewebview2experimentalenvironmentoptions#get_channelsearchkind) +* [ICoreWebView2ExperimentalEnvironmentOptions::put_ChannelSearchKind](https://learn.microsoft.com/microsoft-edge/webview2/reference/win32/icorewebview2experimentalenvironmentoptions#put_channelsearchkind) +* [COREWEBVIEW2_CHANNEL_SEARCH_KIND enum](https://learn.microsoft.com/microsoft-edge/webview2/reference/win32/webview2experimental-idl#corewebview2_channel_search_kind) + +#### [Group policy](#tab/group-policy) Set the `ChannelSearchKind` policy. Name: `` Value: `1` -Download the Edge policy files, which include the WebView2 policy files, from the [Edge Enterprise](https://www.microsoft.com/en-us/edge/business/download?form=MA13FJ) site , or use the built-in policy on Intune. +Do either of the following: +* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Click any of the three **Download Windows Policy** links. +* Use the built-in policy on Intune. --- -**Option 2: Browser Executable Folder** -The browser executable folder is the path to the folder that contains the WebView2 Runtime binaries. This option is useful if you are using a fixed Runtime. It can be set per app through a registry key, environment variable, API, or group policy. + +## Setting the preview channel by using the browser executable folder + +The browser executable folder is the path to the folder that contains the WebView2 Runtime binaries. This option is useful if you're using a fixed Runtime. The browser executable folder path can be set per app through a registry key, environment variable, API, or group policy. + -#### [Registry Key](#tab/registry-key) +#### [Registry key](#tab/registry-key) ```reg REG ADD \Software\Policies\Microsoft\Edge\WebView2\BrowserExecutableFolder /v WebView2APISample.exe /t REG_SZ /d "C:\Users\myname\AppData\Local\Microsoft\Edge SxS\Application\88.0.680.0" ``` -Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. Replace the sample path with the path to the desired Microsoft Edge preview channel. +* Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. + +* Replace the sample path with the path to the desired Microsoft Edge preview channel. + #### [Environment variable](#tab/environment-variable) Name: `WEBVIEW2_BROWSER_EXECUTABLE_FOLDER` Value: `` + #### [API](#tab/api) -Pass the path to the browser executable folder during environment creation with `CreateCoreWebView2EnvironmentWithOptions`. +Pass the path to the browser executable folder during environment creation, by calling `CreateCoreWebView2EnvironmentWithOptions`. + +.NET: +* [todo] + +WinRT: +* [todo] + +Win32: +* [CreateCoreWebView2EnvironmentWithOptions](/microsoft-edge/webview2/reference/win32/webview2-idl#createcorewebview2environmentwithoptions) -#### [Group Policy](#tab/group-policy) -Set `BrowserExecutableFolder` +#### [Group policy](#tab/group-policy) + +Set `BrowserExecutableFolder`. Name: `` Value: `` -Download the Edge policy files, which include the WebView2 policy files, from the Edge Enterprise site , or use the built-in policy on Intune. +Download the Microsoft Edge policy files, which include the WebView2 policy files, from the Edge Enterprise site, or use the built-in policy on Intune. +Do either of the following: +* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Click any of the three **Download Windows Policy** links. +* Use the built-in policy on Intune. --- - - ## See also * [Test upcoming APIs and features](./set-preview-channel.md) +* [Microsoft Edge Insider website](https://www.microsoft.com/edge/download/insider) - download the Canary, Dev, or Beta channel of Microsoft Edge \ No newline at end of file diff --git a/microsoft-edge/webview2/how-to/set-preview-channel.md b/microsoft-edge/webview2/how-to/set-preview-channel.md index def95013ce..d8b7386037 100644 --- a/microsoft-edge/webview2/how-to/set-preview-channel.md +++ b/microsoft-edge/webview2/how-to/set-preview-channel.md @@ -146,7 +146,7 @@ WinForms uses an approach similar to the Win32/C++ approach described above. WPF uses an approach similar to the Win32/C++ approach described above. -Refer to [CoreWebView2CreationProperties.BrowserExecutableFolder Property](/dotnet/api/microsoft.web.webview2.wpf.corewebview2creationproperties.browserexecutablefolder#Microsoft_Web_WebView2_Wpf_CoreWebView2CreationProperties_BrowserExecutableFolder). +See [CoreWebView2CreationProperties.BrowserExecutableFolder Property](/dotnet/api/microsoft.web.webview2.wpf.corewebview2creationproperties.browserexecutablefolder#Microsoft_Web_WebView2_Wpf_CoreWebView2CreationProperties_BrowserExecutableFolder). From f3380044ce89bcf5ac047577a89e170aab9200ca Mon Sep 17 00:00:00 2001 From: Michael Hoffman Date: Tue, 13 Feb 2024 22:39:40 -0800 Subject: [PATCH 05/61] trim api links --- .../webview2/how-to/prerelease-testing.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/microsoft-edge/webview2/how-to/prerelease-testing.md b/microsoft-edge/webview2/how-to/prerelease-testing.md index 5075732f9f..a179f5b3f8 100644 --- a/microsoft-edge/webview2/how-to/prerelease-testing.md +++ b/microsoft-edge/webview2/how-to/prerelease-testing.md @@ -93,17 +93,17 @@ Value: `1` By default, the `CoreWebView2EnvironmentOptions.ChannelSearchKind` property is `CoreWebView2ChannelSearchKind.MostStable` (an enum value). Instead, reverse the search order by setting the `CoreWebView2EnvironmentOptions.ChannelSearchKind` property to `CoreWebView2ChannelSearchKind.LeastStable`. .NET: -* [CoreWebView2EnvironmentOptions.ChannelSearchKind Property](https://learn.microsoft.com/dotnet/api/microsoft.web.webview2.core.corewebview2environmentoptions.channelsearchkind) -* [CoreWebView2ChannelSearchKind Enum](https://learn.microsoft.com/dotnet/api/microsoft.web.webview2.core.corewebview2channelsearchkind) +* [CoreWebView2EnvironmentOptions.ChannelSearchKind Property](/dotnet/api/microsoft.web.webview2.core.corewebview2environmentoptions.channelsearchkind) +* [CoreWebView2ChannelSearchKind Enum](/dotnet/api/microsoft.web.webview2.core.corewebview2channelsearchkind) WinRT: -* [CoreWebView2EnvironmentOptions.ChannelSearchKind Property](https://learn.microsoft.com/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2environmentoptions#channelsearchkind) -* [CoreWebView2ChannelSearchKind Enum](https://learn.microsoft.com/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2channelsearchkind) +* [CoreWebView2EnvironmentOptions.ChannelSearchKind Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2environmentoptions#channelsearchkind) +* [CoreWebView2ChannelSearchKind Enum](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2channelsearchkind) Win32: -* [ICoreWebView2ExperimentalEnvironmentOptions::get_ChannelSearchKind](https://learn.microsoft.com/microsoft-edge/webview2/reference/win32/icorewebview2experimentalenvironmentoptions#get_channelsearchkind) -* [ICoreWebView2ExperimentalEnvironmentOptions::put_ChannelSearchKind](https://learn.microsoft.com/microsoft-edge/webview2/reference/win32/icorewebview2experimentalenvironmentoptions#put_channelsearchkind) -* [COREWEBVIEW2_CHANNEL_SEARCH_KIND enum](https://learn.microsoft.com/microsoft-edge/webview2/reference/win32/webview2experimental-idl#corewebview2_channel_search_kind) +* [ICoreWebView2ExperimentalEnvironmentOptions::get_ChannelSearchKind](/microsoft-edge/webview2/reference/win32/icorewebview2experimentalenvironmentoptions#get_channelsearchkind) +* [ICoreWebView2ExperimentalEnvironmentOptions::put_ChannelSearchKind](/microsoft-edge/webview2/reference/win32/icorewebview2experimentalenvironmentoptions#put_channelsearchkind) +* [COREWEBVIEW2_CHANNEL_SEARCH_KIND enum](/microsoft-edge/webview2/reference/win32/webview2experimental-idl#corewebview2_channel_search_kind) #### [Group policy](#tab/group-policy) From 64dc2f03571d745f970b3177bd5296a4ee832a2e Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Wed, 14 Feb 2024 11:35:17 -0800 Subject: [PATCH 06/61] Complete pre-release testing article --- .../webview2/how-to/prerelease-testing.md | 50 +++++++++++++++++-- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/microsoft-edge/webview2/how-to/prerelease-testing.md b/microsoft-edge/webview2/how-to/prerelease-testing.md index 041838bac6..e00170ba70 100644 --- a/microsoft-edge/webview2/how-to/prerelease-testing.md +++ b/microsoft-edge/webview2/how-to/prerelease-testing.md @@ -10,14 +10,14 @@ ms.date: 02/09/2024 --- # Prerelease testing -Prerelease testing helps apps catch bugs in prerelease channels of WebView2, before they ship in a stable release and degrade the app experience for end users. This document provide guiding principles and tools to help partners get started. +Prerelease testing helps apps catch bugs in prerelease channels of WebView2, before they ship in a stable release and degrade the app experience for end users. This document provide guiding principles and tools to help developers get started. #### What is prerelease testing? -Prerelease testing means validating your app against early builds of WebView2 to ensure that your app works with upcoming changes. This can be accomplished through automated testing and flighting with Edge preview channels, which contain the WebView2 prerelease bits. The [Edge preview channels](https://learn.microsoft.com/en-us/deployedge/microsoft-edge-channels) consist of Canary (daily), Dev (weekly), and Beta (every 4 weeks). +Prerelease testing means validating your app against early builds of WebView2 to ensure that your app works with upcoming changes. This can be accomplished through automated testing with Edge preview channels, which contain the WebView2 preview runtime bits. The stable runtime is the Evergreen WebView2 Runtime, while the preview runtime is the runtime that ships with the Edge preview channels. The [Edge preview channels](https://learn.microsoft.com/en-us/deployedge/microsoft-edge-channels) consist of Canary (daily), Dev (weekly), and Beta (every 4 weeks). #### Why is prerelease testing important? -Evergreen WebView2 is based on the evergreen Chromium platform that receives monthly major updates. Testing against prerelease channels is the de facto way for web developers to validate their apps against incoming browser updates for the past decade and more. A common discovery from investigations that we have conducted in the past year, is that we regression tends to be application specific. WebView2 is tested in a variety of scenarios, but it is impossible to cover all the scenarios that an app might encounter. This means that the only way to catch certain app specific regressions before it ships to stable is to test against prerelease channels. +Evergreen WebView2 is based on the evergreen Chromium platform that receives monthly major updates. Testing against prerelease channels is the de facto way for web developers to validate their apps against incoming browser updates for the past decade and more. A common discovery from investigations that we have conducted in the past year, is that regression tends to be application specific. WebView2 is tested in a variety of scenarios, but it is impossible to cover all the scenarios that an app might encounter. This means that the only way to catch regressions that affect specific apps before it ships to stable is to test against prerelease channels. Some examples of the issues that could have been caught prior to stable prerelease testing include: - [Unable to open https://www.facebook.com, once load will directly ProcessFailed](https://github.com/MicrosoftEdge/WebView2Feedback/issues/4281) @@ -28,6 +28,14 @@ Some examples of the issues that could have been caught prior to stable prerelea We highly recommend that you start with automated testing against the Edge Canary channel, which ships daily, to catch issues as early as possible. Edge Dev that ships weekly is also a good option. +You would need to set up the following: +1. [Set the preview channel for your app](#how-to-set-preview-channel) +1. [Deploy the non-stable channels](#how-to-deploy-non-stable-channels) +1. [Conduct automated testing on your app running against the non-stable channels](#how-to-use-conduct-automated-testing) +1. [Compare the results with the baseline](#what-to-use-as-a-baseline) + +Upon finding issues, you can report them to the [WebView2 feedback repo](https://github.com/MicrosoftEdge/WebView2Feedback). + ##### Tooling and Guidance ###### How to set preview channel @@ -110,10 +118,46 @@ Download the Edge policy files, which include the WebView2 policy files, from th --- +###### How to deploy non-stable channels + +Insider channels + +**Option 1: Manual install on test machines** + +Insider channels can be manually installed through the following links: + +| Channel | Link | +| --- | --- | +| Canary | [Download](https://go.microsoft.com/fwlink/?linkid=2084649&Channel=Canary&language=en) | +| Dev | [Download](https://go.microsoft.com/fwlink/?linkid=2093291) | +| Beta | [Download](https://go.microsoft.com/fwlink/?linkid=2093376) | + +This only needs to be done once per machine. Prerelease channels are evergreen so will automatically get updated when newer versions are available. + +**Option 2: Programmatic depolyment throguh API** + +Periodically poll the following pages to get the latest version for each channel: + +Note: Dev & Beta channels contain MSI Links, while Canary has a separate link + +| Channel | Link | +| --- | --- | +| Canary | [https://edgeupdates.microsoft.com/api/products/canary](https://edgeupdates.microsoft.com/api/products/canary)
[MSI Link](https://go.microsoft.com/fwlink/?linkid=2084649&Channel=Canary&language=en)| +| Dev | [https://edgeupdates.microsoft.com/api/products/dev](https://edgeupdates.microsoft.com/api/products/dev) | +| Beta | [https://edgeupdates.microsoft.com/api/products/beta](https://edgeupdates.microsoft.com/api/products/beta) | + + +###### How to use conduct automated testing +See [Automate and test WebView2 apps with Microsoft Edge WebDriver](https://learn.microsoft.com/en-us/microsoft-edge/webdriver) for more information. +###### What to use as a baseline? +The baseline for testing should be the latest stable release of WebView2. You can use either the Evergreen WebView2 Runtime or a fixed version of the Runtime. You can download the runtimes from [here](https://developer.microsoft.com/microsoft-edge/webview2/). ## See also * [Test upcoming APIs and features](./set-preview-channel.md) +* [Automate and test WebView2 apps with Microsoft Edge WebDriver](https://learn.microsoft.com/en-us/microsoft-edge/webdriver) +* [WebView2 feedback repo](https://github.com/MicrosoftEdge/WebView2Feedback) +* [Site compatibility-impacting changes coming to Microsoft Edge](https://learn.microsoft.com/en-us/microsoft-edge/web-platform/site-impacting-changes) \ No newline at end of file From caa6f0dfdf6d4f6f6025d1b2b05822d592e1fc8c Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Wed, 14 Feb 2024 11:42:24 -0800 Subject: [PATCH 07/61] Merge conflicts --- .../webview2/how-to/prerelease-testing.md | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/microsoft-edge/webview2/how-to/prerelease-testing.md b/microsoft-edge/webview2/how-to/prerelease-testing.md index 5e3c993cb3..df59b27e59 100644 --- a/microsoft-edge/webview2/how-to/prerelease-testing.md +++ b/microsoft-edge/webview2/how-to/prerelease-testing.md @@ -40,19 +40,16 @@ Many issues in specific WebView2 apps can be discovered before WebView2 changes ## Start prerelease testing by doing automated testing against Edge Canary +Start with automated testing against the Microsoft Edge **Canary** channel, which ships daily. This enables you to catch issues as early as possible. The Microsoft Edge **Dev** channel ships weekly, and is also a good option. + You would need to set up the following: -1. [Set the preview channel for your app](#how-to-set-preview-channel) +1. [Set the preview channel for your app](#ways-to-set-the-preview-channel) 1. [Deploy the non-stable channels](#how-to-deploy-non-stable-channels) 1. [Conduct automated testing on your app running against the non-stable channels](#how-to-use-conduct-automated-testing) 1. [Compare the results with the baseline](#what-to-use-as-a-baseline) Upon finding issues, you can report them to the [WebView2 feedback repo](https://github.com/MicrosoftEdge/WebView2Feedback). -##### Tooling and Guidance -Start with automated testing against the Microsoft Edge **Canary** channel, which ships daily. This enables you to catch issues as early as possible. To test your app against Edge Canary, you set the preview channel, as described below. - -The Microsoft Edge **Dev** channel ships weekly, and is also a good option. - ## Ways to set the preview channel @@ -179,7 +176,7 @@ Do either of the following: --- -###### How to deploy non-stable channels +## How to deploy non-stable channels Insider channels @@ -208,10 +205,10 @@ Note: Dev & Beta channels contain MSI Links, while Canary has a separate link | Beta | [https://edgeupdates.microsoft.com/api/products/beta](https://edgeupdates.microsoft.com/api/products/beta) | -###### How to use conduct automated testing +## How to use conduct automated testing See [Automate and test WebView2 apps with Microsoft Edge WebDriver](https://learn.microsoft.com/en-us/microsoft-edge/webdriver) for more information. -###### What to use as a baseline? +## What to use as a baseline? The baseline for testing should be the latest stable release of WebView2. You can use either the Evergreen WebView2 Runtime or a fixed version of the Runtime. You can download the runtimes from [here](https://developer.microsoft.com/microsoft-edge/webview2/). From 9aa56604e59933e3e4449700f3c7143bce403acd Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Wed, 14 Feb 2024 11:48:45 -0800 Subject: [PATCH 08/61] fix language --- microsoft-edge/webview2/how-to/prerelease-testing.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/microsoft-edge/webview2/how-to/prerelease-testing.md b/microsoft-edge/webview2/how-to/prerelease-testing.md index df59b27e59..b1191ee520 100644 --- a/microsoft-edge/webview2/how-to/prerelease-testing.md +++ b/microsoft-edge/webview2/how-to/prerelease-testing.md @@ -1,6 +1,6 @@ --- title: Prerelease testing using the preview channels of Microsoft Edge -description: Test your WebView2 app by using the preview channels of Microsoft Edge (Edge Canary, Edge Dev, or Edge Beta) to find issues that will affect your particular WebView2 app, before WebView2 changes migrate to Edge Stable. +description: Test your WebView2 app by using the preview channels of Microsoft Edge (Edge Canary, Edge Dev, or Edge Beta) to find issues that will affect your particular WebView2 app, before WebView2 changes migrate to the Evergreen WebView2 Runtime author: MSEdgeTeam ms.author: msedgedevrel ms.topic: conceptual @@ -10,11 +10,11 @@ ms.date: 02/09/2024 --- # Prerelease testing using the preview channels of Microsoft Edge -_Prerelease testing_ means testing your WebView2 app by using the preview channels of Microsoft Edge (Edge Canary, Edge Dev, or Edge Beta) to find issues that will affect your particular WebView2 app, before WebView2 changes migrate to Edge Stable. +_Prerelease testing_ means testing your WebView2 app by using the preview channels of Microsoft Edge (Edge Canary, Edge Dev, or Edge Beta) to find issues that will affect your particular WebView2 app, before WebView2 changes migrate to Evergreen WebView2 Runtime. Prerelease testing helps apps catch bugs in prerelease channels of WebView2, before the WebView2 changes ship in a stable release and degrade the app experience for end users. -Prerelease testing means validating your app against early builds of WebView2 to ensure that your app works with upcoming changes. This can be accomplished through automated testing and flighting with the preview channels of Microsoft Edge, which contain the WebView2 prerelease bits. The preview (or "insider") channels of Microsoft Edge consist of: +Prerelease testing means validating your app against early builds of WebView2 to ensure that your app works with upcoming changes. This can be accomplished through automated testing and flighting with the preview channels of Microsoft Edge, which contain the WebView2 preview runtimes. The preview (or "insider") channels of Microsoft Edge consist of: * Edge Canary - releases daily. * Edge Dev - releases weekly. * Edge Beta - releases every 4 weeks. From df208ecf95292fcb0c1bc5abc65aa73d77c9572b Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Wed, 14 Feb 2024 11:50:00 -0800 Subject: [PATCH 09/61] remove flighting --- microsoft-edge/webview2/how-to/prerelease-testing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microsoft-edge/webview2/how-to/prerelease-testing.md b/microsoft-edge/webview2/how-to/prerelease-testing.md index b1191ee520..df4976f601 100644 --- a/microsoft-edge/webview2/how-to/prerelease-testing.md +++ b/microsoft-edge/webview2/how-to/prerelease-testing.md @@ -14,7 +14,7 @@ _Prerelease testing_ means testing your WebView2 app by using the preview channe Prerelease testing helps apps catch bugs in prerelease channels of WebView2, before the WebView2 changes ship in a stable release and degrade the app experience for end users. -Prerelease testing means validating your app against early builds of WebView2 to ensure that your app works with upcoming changes. This can be accomplished through automated testing and flighting with the preview channels of Microsoft Edge, which contain the WebView2 preview runtimes. The preview (or "insider") channels of Microsoft Edge consist of: +Prerelease testing means validating your app against early builds of WebView2 to ensure that your app works with upcoming changes. This can be accomplished through automated testing with the preview channels of Microsoft Edge, which contain the WebView2 preview runtimes. The preview (or "insider") channels of Microsoft Edge consist of: * Edge Canary - releases daily. * Edge Dev - releases weekly. * Edge Beta - releases every 4 weeks. From bb297401dae6bdf1b9f677ba49abdb1092970526 Mon Sep 17 00:00:00 2001 From: Michael Hoffman Date: Wed, 14 Feb 2024 12:24:16 -0800 Subject: [PATCH 10/61] Writer/Editor pass on latest commit --- .../webview2/how-to/prerelease-testing.md | 82 ++++++++++++------- 1 file changed, 53 insertions(+), 29 deletions(-) diff --git a/microsoft-edge/webview2/how-to/prerelease-testing.md b/microsoft-edge/webview2/how-to/prerelease-testing.md index df4976f601..56124a598a 100644 --- a/microsoft-edge/webview2/how-to/prerelease-testing.md +++ b/microsoft-edge/webview2/how-to/prerelease-testing.md @@ -1,20 +1,20 @@ --- title: Prerelease testing using the preview channels of Microsoft Edge -description: Test your WebView2 app by using the preview channels of Microsoft Edge (Edge Canary, Edge Dev, or Edge Beta) to find issues that will affect your particular WebView2 app, before WebView2 changes migrate to the Evergreen WebView2 Runtime +description: How to test your WebView2 app by using the preview channels of Microsoft Edge (Edge Canary, Edge Dev, or Edge Beta) to find issues that will affect your particular WebView2 app, before WebView2 changes migrate to the Evergreen WebView2 Runtime. author: MSEdgeTeam ms.author: msedgedevrel ms.topic: conceptual ms.service: microsoft-edge ms.subservice: webview -ms.date: 02/09/2024 +ms.date: 02/14/2024 --- # Prerelease testing using the preview channels of Microsoft Edge -_Prerelease testing_ means testing your WebView2 app by using the preview channels of Microsoft Edge (Edge Canary, Edge Dev, or Edge Beta) to find issues that will affect your particular WebView2 app, before WebView2 changes migrate to Evergreen WebView2 Runtime. +_Prerelease testing_ means testing your WebView2 app by using the preview channels of Microsoft Edge to find issues that will affect your particular WebView2 app, before WebView2 changes migrate to Evergreen WebView2 Runtime. Prerelease testing helps your app catch bugs in prerelease channels of WebView2, before the WebView2 changes ship in a stable release and degrade the app experience for end users. In prerelease testing, you validate your app against early builds of WebView2, to ensure that your app will work with the upcoming changes. -Prerelease testing helps apps catch bugs in prerelease channels of WebView2, before the WebView2 changes ship in a stable release and degrade the app experience for end users. +To validate your app against early builds of WebView2, do automated testing with the preview channels of Microsoft Edge. A preview channel contains a WebView2 preview runtime. -Prerelease testing means validating your app against early builds of WebView2 to ensure that your app works with upcoming changes. This can be accomplished through automated testing with the preview channels of Microsoft Edge, which contain the WebView2 preview runtimes. The preview (or "insider") channels of Microsoft Edge consist of: +The preview (or "insider") channels of Microsoft Edge consist of: * Edge Canary - releases daily. * Edge Dev - releases weekly. * Edge Beta - releases every 4 weeks. @@ -27,7 +27,7 @@ See also: ## Importance of prerelease testing -Evergreen WebView2 is based on the evergreen Chromium platform, which receives monthly major updates. Testing against prerelease channels (Edge Canary, Edge Dev, or Edge Beta) is the way to validate your own, particular app against incoming browser updates. Regressions in WebView2 apps tend to be application-specific, rather than affecting all WebView2 apps. +Evergreen WebView2 is based on the evergreen Chromium platform, which receives monthly major updates. To validate your own, particular app against incoming browser updates, test your WebView2 app against the prerelease channels of Microsoft Edge (Edge Canary, Edge Dev, or Edge Beta). Regressions in WebView2 apps tend to be application-specific, rather than affecting all WebView2 apps. The only way to catch app-specific regressions before WebView2 changes ship in Edge Stable is to test your particular app against the prerelease channels of Microsoft Edge. WebView2 is tested in a variety of general scenarios, but it's not feasible for that general testing to cover all the scenarios that various specific apps might encounter. @@ -38,17 +38,17 @@ Many issues in specific WebView2 apps can be discovered before WebView2 changes -## Start prerelease testing by doing automated testing against Edge Canary +## Start by doing automated testing against Edge Canary Start with automated testing against the Microsoft Edge **Canary** channel, which ships daily. This enables you to catch issues as early as possible. The Microsoft Edge **Dev** channel ships weekly, and is also a good option. -You would need to set up the following: -1. [Set the preview channel for your app](#ways-to-set-the-preview-channel) -1. [Deploy the non-stable channels](#how-to-deploy-non-stable-channels) -1. [Conduct automated testing on your app running against the non-stable channels](#how-to-use-conduct-automated-testing) -1. [Compare the results with the baseline](#what-to-use-as-a-baseline) +Do the following steps: +1. Set the preview channel for your app. See [Ways to set the preview channel](#ways-to-set-the-preview-channel), below. +1. Deploy the non-stable channels. See [todo](#how-to-deploy-non-stable-channels), below. +1. Conduct automated testing on your app running against the non-stable channels. See [todo](#how-to-use-conduct-automated-testing), below. +1. Compare the results with the baseline. See [todo](#what-to-use-as-a-baseline), below. -Upon finding issues, you can report them to the [WebView2 feedback repo](https://github.com/MicrosoftEdge/WebView2Feedback). +Upon finding issues, you can report them via the [WebView2 feedback repo](https://github.com/MicrosoftEdge/WebView2Feedback). @@ -80,6 +80,7 @@ The channel search kind can be set per app through a registry key, environment v The value `1` indicates reversed search order; that is, from least-stable (Edge Canary) to most-stable. + #### [Registry key](#tab/registry-key) ```reg @@ -94,6 +95,7 @@ Replace `WebView2APISample.exe` with your own app executable name or the applica Name: `WEBVIEW2_CHANNEL_SEARCH_KIND` Value: `1` + #### [API](#tab/api) By default, the `CoreWebView2EnvironmentOptions.ChannelSearchKind` property is `CoreWebView2ChannelSearchKind.MostStable` (an enum value). Instead, reverse the search order by setting the `CoreWebView2EnvironmentOptions.ChannelSearchKind` property to `CoreWebView2ChannelSearchKind.LeastStable`. @@ -111,6 +113,7 @@ Win32: * [ICoreWebView2ExperimentalEnvironmentOptions::put_ChannelSearchKind](/microsoft-edge/webview2/reference/win32/icorewebview2experimentalenvironmentoptions#put_channelsearchkind) * [COREWEBVIEW2_CHANNEL_SEARCH_KIND enum](/microsoft-edge/webview2/reference/win32/webview2experimental-idl#corewebview2_channel_search_kind) + #### [Group policy](#tab/group-policy) Set the `ChannelSearchKind` policy. @@ -137,9 +140,9 @@ The browser executable folder is the path to the folder that contains the WebVie REG ADD \Software\Policies\Microsoft\Edge\WebView2\BrowserExecutableFolder /v WebView2APISample.exe /t REG_SZ /d "C:\Users\myname\AppData\Local\Microsoft\Edge SxS\Application\88.0.680.0" ``` -* Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. +* Replace `WebView2APISample.exe` with your app's executable name, or with the application user model ID. -* Replace the sample path with the path to the desired Microsoft Edge preview channel. +* Replace the example path with the path to the desired Microsoft Edge preview channel. #### [Environment variable](#tab/environment-variable) @@ -176,47 +179,68 @@ Do either of the following: --- + + ## How to deploy non-stable channels -Insider channels +Preview channels of Microsoft Edge are also called _insider channels_. These are the non-stable channels of Microsoft Edge. + +You can deploy a preview channel of Microsoft Edge by doing either of the following: +* Manually install preview channels on test machines. +* Programmatically deploy preview channels via API. + +These options are explained below. + -**Option 1: Manual install on test machines** + +#### Option 1: Manually install preview channels on test machines Insider channels can be manually installed through the following links: | Channel | Link | | --- | --- | -| Canary | [Download](https://go.microsoft.com/fwlink/?linkid=2084649&Channel=Canary&language=en) | +| Canary | [Download](https://go.microsoft.com/fwlink/?linkid=2084649&Channel=Canary) | | Dev | [Download](https://go.microsoft.com/fwlink/?linkid=2093291) | | Beta | [Download](https://go.microsoft.com/fwlink/?linkid=2093376) | -This only needs to be done once per machine. Prerelease channels are evergreen so will automatically get updated when newer versions are available. +This only needs to be done once per machine. Prerelease channels are evergreen, so will automatically get updated when newer versions are available. -**Option 2: Programmatic depolyment throguh API** -Periodically poll the following pages to get the latest version for each channel: + +#### Option 2: Programmatically deploy preview channels via API -Note: Dev & Beta channels contain MSI Links, while Canary has a separate link + + +In your app's code, periodically poll the following pages to get and deploy the latest version of each preview channel of Microsoft Edge. | Channel | Link | | --- | --- | -| Canary | [https://edgeupdates.microsoft.com/api/products/canary](https://edgeupdates.microsoft.com/api/products/canary)
[MSI Link](https://go.microsoft.com/fwlink/?linkid=2084649&Channel=Canary&language=en)| +| Canary | [https://edgeupdates.microsoft.com/api/products/canary](https://edgeupdates.microsoft.com/api/products/canary)
[MSI Link](https://go.microsoft.com/fwlink/?linkid=2084649&Channel=Canary) | | Dev | [https://edgeupdates.microsoft.com/api/products/dev](https://edgeupdates.microsoft.com/api/products/dev) | | Beta | [https://edgeupdates.microsoft.com/api/products/beta](https://edgeupdates.microsoft.com/api/products/beta) | +The Edge Dev and Edge Beta channels contain MSI Links. The Edge Canary channel has a separate MSI link. + + + + + +## How to do automated testing + +See [Automate and test WebView2 apps with Microsoft Edge WebDriver](/microsoft-edge/webdriver). -## How to use conduct automated testing -See [Automate and test WebView2 apps with Microsoft Edge WebDriver](https://learn.microsoft.com/en-us/microsoft-edge/webdriver) for more information. -## What to use as a baseline? -The baseline for testing should be the latest stable release of WebView2. You can use either the Evergreen WebView2 Runtime or a fixed version of the Runtime. You can download the runtimes from [here](https://developer.microsoft.com/microsoft-edge/webview2/). + +## The baseline release of WebView2 for testing + +The baseline for testing should be the latest stable release of WebView2. You can use either the Evergreen WebView2 Runtime or a fixed version of the Runtime. You can download the runtimes from the [Microsoft Edge WebView2](https://developer.microsoft.com/microsoft-edge/webview2/) page at developer.microsoft.com. ## See also * [Test upcoming APIs and features](./set-preview-channel.md) -* [Automate and test WebView2 apps with Microsoft Edge WebDriver](https://learn.microsoft.com/en-us/microsoft-edge/webdriver) +* [Automate and test WebView2 apps with Microsoft Edge WebDriver](/microsoft-edge/webdriver) * [WebView2 feedback repo](https://github.com/MicrosoftEdge/WebView2Feedback) -* [Site compatibility-impacting changes coming to Microsoft Edge](https://learn.microsoft.com/en-us/microsoft-edge/web-platform/site-impacting-changes) +* [Site compatibility-impacting changes coming to Microsoft Edge](/microsoft-edge/web-platform/site-impacting-changes) * [Microsoft Edge Insider website](https://www.microsoft.com/edge/download/insider) - download the Canary, Dev, or Beta channel of Microsoft Edge From ff726470627c9fbf3692a87a62b783ea78a393bc Mon Sep 17 00:00:00 2001 From: Michael Hoffman Date: Wed, 14 Feb 2024 12:37:50 -0800 Subject: [PATCH 11/61] fix internal links --- microsoft-edge/webview2/how-to/prerelease-testing.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/microsoft-edge/webview2/how-to/prerelease-testing.md b/microsoft-edge/webview2/how-to/prerelease-testing.md index 56124a598a..4eaf8f9423 100644 --- a/microsoft-edge/webview2/how-to/prerelease-testing.md +++ b/microsoft-edge/webview2/how-to/prerelease-testing.md @@ -31,7 +31,7 @@ Evergreen WebView2 is based on the evergreen Chromium platform, which receives m The only way to catch app-specific regressions before WebView2 changes ship in Edge Stable is to test your particular app against the prerelease channels of Microsoft Edge. WebView2 is tested in a variety of general scenarios, but it's not feasible for that general testing to cover all the scenarios that various specific apps might encounter. -Many issues in specific WebView2 apps can be discovered before WebView2 changes reach Edge Stable by doing prerelease testing (such as in Edge Canary). For example, the following issues have been caught: +Many issues in specific WebView2 apps can be discovered before WebView2 changes reach the Stable WebView2 Runtime, by doing prerelease testing, such as in Edge Canary. For example, the following issues have been caught: - [Unable to open https://www.facebook.com, once load will directly ProcessFailed](https://github.com/MicrosoftEdge/WebView2Feedback/issues/4281) - [MSEdgeWebView2 crashes when trying to preview a file through Monaco in file explorer using PowerToys](https://github.com/MicrosoftEdge/WebView2Feedback/issues/4228) - [CoreWebView2PrintSettings.ScaleFactor is not working](https://github.com/MicrosoftEdge/WebView2Feedback/issues/4082) @@ -44,9 +44,9 @@ Start with automated testing against the Microsoft Edge **Canary** channel, whic Do the following steps: 1. Set the preview channel for your app. See [Ways to set the preview channel](#ways-to-set-the-preview-channel), below. -1. Deploy the non-stable channels. See [todo](#how-to-deploy-non-stable-channels), below. -1. Conduct automated testing on your app running against the non-stable channels. See [todo](#how-to-use-conduct-automated-testing), below. -1. Compare the results with the baseline. See [todo](#what-to-use-as-a-baseline), below. +1. Deploy the non-stable channels. See [How to deploy non-stable channels](#how-to-deploy-non-stable-channels), below. +1. Conduct automated testing on your app running against the non-stable channels. See [How to do automated testing](#how-to-do-automated-testing), below. +1. Compare the results with the baseline. See [The baseline release of WebView2 for testing](#the-baseline-release-of-webview2-for-testing), below. Upon finding issues, you can report them via the [WebView2 feedback repo](https://github.com/MicrosoftEdge/WebView2Feedback). From c60ba99fbe477b4647b4cf6d53e28e68d6db461f Mon Sep 17 00:00:00 2001 From: Michael Hoffman Date: Wed, 14 Feb 2024 13:05:56 -0800 Subject: [PATCH 12/61] Remove dup old paragraph --- microsoft-edge/webview2/how-to/prerelease-testing.md | 1 - 1 file changed, 1 deletion(-) diff --git a/microsoft-edge/webview2/how-to/prerelease-testing.md b/microsoft-edge/webview2/how-to/prerelease-testing.md index 4eaf8f9423..3a60e91bcb 100644 --- a/microsoft-edge/webview2/how-to/prerelease-testing.md +++ b/microsoft-edge/webview2/how-to/prerelease-testing.md @@ -172,7 +172,6 @@ Set `BrowserExecutableFolder`. Name: `` Value: `` -Download the Microsoft Edge policy files, which include the WebView2 policy files, from the Edge Enterprise site, or use the built-in policy on Intune. Do either of the following: * Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Click any of the three **Download Windows Policy** links. * Use the built-in policy on Intune. From 76a12c39b599bf4a8c042fb0550425cbfd9de1d8 Mon Sep 17 00:00:00 2001 From: Michael Hoffman Date: Wed, 14 Feb 2024 14:49:10 -0800 Subject: [PATCH 13/61] Tabs for API browserExecutableFolder --- .../webview2/how-to/prerelease-testing.md | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/microsoft-edge/webview2/how-to/prerelease-testing.md b/microsoft-edge/webview2/how-to/prerelease-testing.md index 3a60e91bcb..26d65458d9 100644 --- a/microsoft-edge/webview2/how-to/prerelease-testing.md +++ b/microsoft-edge/webview2/how-to/prerelease-testing.md @@ -153,16 +153,28 @@ Value: `` #### [API](#tab/api) -Pass the path to the browser executable folder during environment creation, by calling `CreateCoreWebView2EnvironmentWithOptions`. +Pass the path to the browser executable folder during environment creation: -.NET: -* [todo] +##### [.NET/C#](#tab/dotnetcsharp) -WinRT: -* [todo] +* `CoreWebView2EnvironmentOptions` Class: + * [CoreWebView2EnvironmentOptions.AdditionalBrowserArguments Property](/dotnet/api/microsoft.web.webview2.core.corewebview2environmentoptions.additionalbrowserarguments) -Win32: -* [CreateCoreWebView2EnvironmentWithOptions](/microsoft-edge/webview2/reference/win32/webview2-idl#createcorewebview2environmentwithoptions) +##### [WinRT/C#](#tab/winrtcsharp) + +* `CoreWebView2EnvironmentOptions` Class: + * [CoreWebView2EnvironmentOptions.AdditionalBrowserArguments Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2environmentoptions#additionalbrowserarguments) + +##### [Win32/C++](#tab/win32cpp) + +Globals: + * [CreateCoreWebView2EnvironmentWithOptions(browserExecutableFolder, userDataFolder, environmentOptions, environmentCreatedHandler)](/microsoft-edge/webview2/reference/win32/webview2-idl#createcorewebview2environmentwithoptions) + +* `ICoreWebView2EnvironmentOptions`: + * [ICoreWebView2EnvironmentOptions::get_AdditionalBrowserArguments](/microsoft-edge/webview2/reference/win32/icorewebview2environmentoptions#get_additionalbrowserarguments) + * [ICoreWebView2EnvironmentOptions::put_AdditionalBrowserArguments](/microsoft-edge/webview2/reference/win32/icorewebview2environmentoptions#put_additionalbrowserarguments) + +--- #### [Group policy](#tab/group-policy) From f50c34d58455c2c3e5d67606db25f02416664a56 Mon Sep 17 00:00:00 2001 From: Michael Hoffman Date: Wed, 14 Feb 2024 14:52:44 -0800 Subject: [PATCH 14/61] Remove nested tab-set --- microsoft-edge/webview2/how-to/prerelease-testing.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/microsoft-edge/webview2/how-to/prerelease-testing.md b/microsoft-edge/webview2/how-to/prerelease-testing.md index 26d65458d9..62061b5e61 100644 --- a/microsoft-edge/webview2/how-to/prerelease-testing.md +++ b/microsoft-edge/webview2/how-to/prerelease-testing.md @@ -155,17 +155,17 @@ Value: `` Pass the path to the browser executable folder during environment creation: -##### [.NET/C#](#tab/dotnetcsharp) +**.NET:** * `CoreWebView2EnvironmentOptions` Class: * [CoreWebView2EnvironmentOptions.AdditionalBrowserArguments Property](/dotnet/api/microsoft.web.webview2.core.corewebview2environmentoptions.additionalbrowserarguments) -##### [WinRT/C#](#tab/winrtcsharp) +**WinRT:** * `CoreWebView2EnvironmentOptions` Class: * [CoreWebView2EnvironmentOptions.AdditionalBrowserArguments Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2environmentoptions#additionalbrowserarguments) -##### [Win32/C++](#tab/win32cpp) +**Win32:** Globals: * [CreateCoreWebView2EnvironmentWithOptions(browserExecutableFolder, userDataFolder, environmentOptions, environmentCreatedHandler)](/microsoft-edge/webview2/reference/win32/webview2-idl#createcorewebview2environmentwithoptions) @@ -174,8 +174,6 @@ Globals: * [ICoreWebView2EnvironmentOptions::get_AdditionalBrowserArguments](/microsoft-edge/webview2/reference/win32/icorewebview2environmentoptions#get_additionalbrowserarguments) * [ICoreWebView2EnvironmentOptions::put_AdditionalBrowserArguments](/microsoft-edge/webview2/reference/win32/icorewebview2environmentoptions#put_additionalbrowserarguments) ---- - #### [Group policy](#tab/group-policy) From 787da0fe01edbca3659849f3644585c2282adf6f Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Wed, 14 Feb 2024 15:47:25 -0800 Subject: [PATCH 15/61] First draft of selfhosting --- .../webview2/how-to/self-hosting.md | 177 +++++++++++++++++- 1 file changed, 173 insertions(+), 4 deletions(-) diff --git a/microsoft-edge/webview2/how-to/self-hosting.md b/microsoft-edge/webview2/how-to/self-hosting.md index efa69f5c44..4dcd6dd56e 100644 --- a/microsoft-edge/webview2/how-to/self-hosting.md +++ b/microsoft-edge/webview2/how-to/self-hosting.md @@ -8,16 +8,185 @@ ms.service: microsoft-edge ms.subservice: webview ms.date: 02/09/2024 --- -# Self-hosting +# Self-hosting using the preview channels of WebView2 +_Self-hosting_ refers to the process of deploying a preview version of the WebView2 Runtime with your app. This allows you and your development team to use your app daily with the preview version of the WebView2 to find issues that will affect your particular WebView2 app, before they migrate to the Evergreen WebView2 Runtime. + +This provides real-world usage of your app with the latest version of the WebView2 Runtime to catch any issues that may arise. This is to be done in tendem with pre-release testing of your app, which instead provides a structured approach to testing your app with the latest version of the WebView2 Runtime. + +See also: +* [Pre-release testing](https://docs.microsoft.com/microsoft-edge/webview2/how-to/pre-release-testing) + +## How to self-host preview channel of WebView2? + +We recommend that you start selfhosting with the Dev channel of the WebView2 runtime in the Dev Channel of Microsoft Edge Browser. The Dev channel of the WebView2 runtime is updated weekly, and it allows you to catch issues early, while having sufficient stability for daily use. + +The Canary channel is also suitable, but do note that it might be less stable. The Beta channel is available as well, but it is not recommended as you might not be able to catch issues early enough for your app. + +You would need to set up the following: +1. [Set the preview channel for your app](#ways-to-set-the-preview-channel) +1. [Install the preview channel on your team's machines](#install-the-preview-channel-on-your-teams-machines +1. Use your app daily with the preview channel of WebView2, and [diagnose potential issues with the WebView2 Runtime](#diagnose-potential-issues-with-the-webview2-runtime) + +Upon finding issues, you can report them to the [Microsoft Edge WebView2 feedback repository](https://github.com/MicrosoftEdge/WebView2Feedback). + + +## Ways to set the preview channel + +You can set the preview channel by doing either of the following: +* Use `ChannelSearchKind` to set the channel search order. +* Use the browser executable folder. + +These options are explained below. + +## Setting the preview channel by using ChannelSearchKind to set the channel search order + +The channel search kind controls the default channel search order. By default, the WebView2 loader searches for binaries from most-stable to least-stable (Canary), using the first binary that's found: + +``` +WebView2 Runtime (Stable) -> Edge Beta -> Edge Dev -> Edge Canary +``` + +To selfhost, you would reverse the channel search order, so that the loader looks for binaries in order from least-stable (Canary) to most-stable: + +``` +Edge Canary -> Edge Dev -> Edge Beta -> WebView2 Runtime (Stable) +``` + +The channel search kind can be set per app through a registry key, environment variable, API, or group policy. + +The value `1` indicates reversed search order; that is, from least-stable (Edge Canary) to most-stable. + +#### [Registry key](#tab/registry-key) + +```reg +REG ADD \Software\Policies\Microsoft\Edge\WebView2\ChannelSearchKind /v WebView2APISample.exe /t REG_DWORD /d 1 +``` + +Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. + +#### [Environment variable](#tab/environment-variable) + +Name: `WEBVIEW2_CHANNEL_SEARCH_KIND` +Value: `1` + +Note that the environment variable will be applied to all apps that use WebView2 on the machine, unlike the registry key, which can be set per app. + +#### [Group policy](#tab/group-policy) + +Set the `ChannelSearchKind` policy. + +Name: `` +Value: `1` + +Do either of the following: +* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Click any of the three **Download Windows Policy** links. +* Use the built-in policy on Intune. + +--- -## Heading +## Setting the preview channel by using the browser executable folder + +The browser executable folder is the path to the folder that contains the WebView2 Runtime binaries. This option is useful if you're using a fixed Runtime. The browser executable folder path can be set per app through a registry key, environment variable, API, or group policy. + + +#### [Registry key](#tab/registry-key) + +```reg +REG ADD \Software\Policies\Microsoft\Edge\WebView2\BrowserExecutableFolder /v WebView2APISample.exe /t REG_SZ /d "C:\Users\myname\AppData\Local\Microsoft\Edge SxS\Application\88.0.680.0" +``` + +* Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. +* Replace the sample path with the path to the desired Microsoft Edge preview channel. - -#### Subheading +#### [Environment variable](#tab/environment-variable) + +Name: `WEBVIEW2_BROWSER_EXECUTABLE_FOLDER` +Value: `` + +Note that the environment variable will be applied to all apps that use WebView2 on the machine, unlike the registry key, which can be set per app. + +#### [Group policy](#tab/group-policy) + +Set `BrowserExecutableFolder`. + +Name: `` +Value: `` + +Download the Microsoft Edge policy files, which include the WebView2 policy files, from the Edge Enterprise site, or use the built-in policy on Intune. +Do either of the following: +* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Click any of the three **Download Windows Policy** links. +* Use the built-in policy on Intune. + +--- + +## Install the preview channel on your team's machines + +Insider channels + +**Option 1: Manual install on machines** + +Insider channels can be manually installed through the following links: + +| Channel | Link | +| --- | --- | +| Canary | [Download](https://go.microsoft.com/fwlink/?linkid=2084649&Channel=Canary&language=en) | +| Dev | [Download](https://go.microsoft.com/fwlink/?linkid=2093291) | +| Beta | [Download](https://go.microsoft.com/fwlink/?linkid=2093376) | + +This only needs to be done once per machine. Prerelease channels are evergreen so they will automatically get updated when newer versions are available. + +**Option 2: Programmatic depolyment through API** + +Periodically poll the following pages to get the latest version for each channel: + +Note: Dev & Beta channels contain MSI Links, while Canary has a separate link + +| Channel | Link | +| --- | --- | +| Canary | [https://edgeupdates.microsoft.com/api/products/canary](https://edgeupdates.microsoft.com/api/products/canary)
[MSI Link](https://go.microsoft.com/fwlink/?linkid=2084649&Channel=Canary&language=en)| +| Dev | [https://edgeupdates.microsoft.com/api/products/dev](https://edgeupdates.microsoft.com/api/products/dev) | +| Beta | [https://edgeupdates.microsoft.com/api/products/beta](https://edgeupdates.microsoft.com/api/products/beta) | + +## Diagnose potential issues with the WebView2 Runtime + +**Confirm that your application is running preview WebView2** + +1. Download [WebView2 Utilities](https://github.com/david-risney/WebView2Utilities), a toolkit that helps with debugging Microsoft Edge WebView2 apps. You can use the [ClickOnce Install](https://david-risney.github.io/WebView2Utilities/install/WebView2Utilities.application) on the page. + +1. See if the executable of the app you want to investigate is in the left-hand pane, and select to read the runtime version of the app. The runtime channel should reflect a preview channel. + +**Switch to stable channel WebView2 to see if the issue reproduces** + +If the issue does not reproduce on the stable channel, it is likely that the issue is with the preview channel of WebView2 or how the app interacts with the preview channel. + +You can easily switch to the stable channel using environmental variables, as they override the registry settings (which are set by group policies), and this allows you to easily switch to a stable channel to see if the issue reproduces. If you are already using environmental variables, you will simply update the values. Do note that environment variables will change the channel for all apps that use WebView2 on the machine. + +For `ChannelSearchKind` options, set the following: + +Name: `WEBVIEW2_CHANNEL_SEARCH_KIND` +Value: `0` + +For `BrowserExecutableFolder` options, set the following: + +Name: `WEBVIEW2_BROWSER_EXECUTABLE_FOLDER` +Value: `` + +**Collecting Logs** + +1. Using the WebView2 Utilities, you can collect logs for the WebView2 Runtime and the app. This can be done by selecting the app in the left-hand pane, and then selecting the `Create Report` button. +1. You can then report the issue to the [Microsoft Edge WebView2 feedback repository](https://github.com/MicrosoftEdge/WebView2Feedback). + + ## See also + +* [Test upcoming APIs and features](./set-preview-channel.md) +* [Pre-release testing](https://docs.microsoft.com/microsoft-edge/webview2/how-to/pre-release-testing) +* [WebView2 feedback repo](https://github.com/MicrosoftEdge/WebView2Feedback) +* [Site compatibility-impacting changes coming to Microsoft Edge](https://learn.microsoft.com/en-us/microsoft-edge/web-platform/site-impacting-changes) +* [Microsoft Edge Insider website](https://www.microsoft.com/edge/download/insider) - download the Canary, Dev, or Beta channel of Microsoft Edge From dd124a3cb265c32fda5c8d3c6cb6cda264305567 Mon Sep 17 00:00:00 2001 From: Michael Hoffman Date: Thu, 15 Feb 2024 10:03:10 -0800 Subject: [PATCH 16/61] Writer/Editor pass on self-hosting.md --- microsoft-edge/toc.yml | 8 +- .../webview2/how-to/prerelease-testing.md | 11 +- .../webview2/how-to/self-hosting.md | 135 ++++++++++++------ 3 files changed, 100 insertions(+), 54 deletions(-) diff --git a/microsoft-edge/toc.yml b/microsoft-edge/toc.yml index b36953bd27..d3583fe852 100644 --- a/microsoft-edge/toc.yml +++ b/microsoft-edge/toc.yml @@ -1306,18 +1306,18 @@ - name: Test upcoming APIs and features href: webview2/how-to/set-preview-channel.md - - name: Prerelease testing + - name: Prerelease testing using preview channels href: webview2/how-to/prerelease-testing.md + - name: Self-hosting by deploying preview channels + href: webview2/how-to/self-hosting.md + - name: Use Playwright to automate and test in WebView2 href: webview2/how-to/playwright.md - name: Automate and test WebView2 apps with Microsoft Edge WebDriver href: webview2/how-to/webdriver.md - - name: Self-hosting # todo: move this TOC entry - href: webview2/how-to/self-hosting.md - # ----------------------------------------------------------------------------- - name: Debug WebView2 apps diff --git a/microsoft-edge/webview2/how-to/prerelease-testing.md b/microsoft-edge/webview2/how-to/prerelease-testing.md index 62061b5e61..dc77f1c94e 100644 --- a/microsoft-edge/webview2/how-to/prerelease-testing.md +++ b/microsoft-edge/webview2/how-to/prerelease-testing.md @@ -1,14 +1,14 @@ --- -title: Prerelease testing using the preview channels of Microsoft Edge +title: Prerelease testing using preview channels description: How to test your WebView2 app by using the preview channels of Microsoft Edge (Edge Canary, Edge Dev, or Edge Beta) to find issues that will affect your particular WebView2 app, before WebView2 changes migrate to the Evergreen WebView2 Runtime. author: MSEdgeTeam ms.author: msedgedevrel ms.topic: conceptual ms.service: microsoft-edge ms.subservice: webview -ms.date: 02/14/2024 +ms.date: 02/15/2024 --- -# Prerelease testing using the preview channels of Microsoft Edge +# Prerelease testing using preview channels _Prerelease testing_ means testing your WebView2 app by using the preview channels of Microsoft Edge to find issues that will affect your particular WebView2 app, before WebView2 changes migrate to Evergreen WebView2 Runtime. Prerelease testing helps your app catch bugs in prerelease channels of WebView2, before the WebView2 changes ship in a stable release and degrade the app experience for end users. In prerelease testing, you validate your app against early builds of WebView2, to ensure that your app will work with the upcoming changes. @@ -22,6 +22,7 @@ The preview (or "insider") channels of Microsoft Edge consist of: See also: * [Overview of the Microsoft Edge channels](/deployedge/microsoft-edge-channels) * [Become a Microsoft Edge Insider](https://www.microsoft.com/edge/download/insider) - download Edge Canary, Edge Dev, or Edge Beta +* [Self-hosting by deploying preview channels](./self-hosting.md) @@ -248,8 +249,10 @@ The baseline for testing should be the latest stable release of WebView2. You c ## See also +* [Self-hosting by deploying preview channels](./self-hosting.md) * [Test upcoming APIs and features](./set-preview-channel.md) * [Automate and test WebView2 apps with Microsoft Edge WebDriver](/microsoft-edge/webdriver) * [WebView2 feedback repo](https://github.com/MicrosoftEdge/WebView2Feedback) * [Site compatibility-impacting changes coming to Microsoft Edge](/microsoft-edge/web-platform/site-impacting-changes) -* [Microsoft Edge Insider website](https://www.microsoft.com/edge/download/insider) - download the Canary, Dev, or Beta channel of Microsoft Edge +* [Overview of the Microsoft Edge channels](/deployedge/microsoft-edge-channels) +* [Become a Microsoft Edge Insider](https://www.microsoft.com/edge/download/insider) - download Edge Canary, Edge Dev, or Edge Beta diff --git a/microsoft-edge/webview2/how-to/self-hosting.md b/microsoft-edge/webview2/how-to/self-hosting.md index 4dcd6dd56e..60bd214df6 100644 --- a/microsoft-edge/webview2/how-to/self-hosting.md +++ b/microsoft-edge/webview2/how-to/self-hosting.md @@ -1,36 +1,47 @@ --- -title: Self-hosting -description: Self-hosting. +title: Self-hosting by deploying preview channels +description: How to set up self-hosting by deploying using the WebView2 preview channels, which are the Insider preview channels of Microsoft Edge (Canary, Dev, and Beta). author: MSEdgeTeam ms.author: msedgedevrel ms.topic: conceptual ms.service: microsoft-edge ms.subservice: webview -ms.date: 02/09/2024 +ms.date: 02/15/2024 --- -# Self-hosting using the preview channels of WebView2 +# Self-hosting by deploying preview channels -_Self-hosting_ refers to the process of deploying a preview version of the WebView2 Runtime with your app. This allows you and your development team to use your app daily with the preview version of the WebView2 to find issues that will affect your particular WebView2 app, before they migrate to the Evergreen WebView2 Runtime. +_Self-hosting_ means deploying a preview version of the WebView2 Runtime with your app. This allows you and your development team to use your app daily with the preview version of the WebView2 Runtime, to find issues that will affect your particular WebView2 app, before the forthcoming changes in the WebView2 Runtime preview migrate to the Evergreen WebView2 Runtime. -This provides real-world usage of your app with the latest version of the WebView2 Runtime to catch any issues that may arise. This is to be done in tendem with pre-release testing of your app, which instead provides a structured approach to testing your app with the latest version of the WebView2 Runtime. +The self-hosting approach provides real-world usage of your app with the latest prerelease version of the WebView2 Runtime, to catch any issues that may arise. Do this self-hosting approach in tandem with prerelease testing of your app, which instead provides a structured approach to testing your app with the latest version of the WebView2 Runtime. + +| Approach | Technique | Purpose/value | +|---|---|---| +| Prerelease testing | todo | todo | +| Self-hosting | Deploy a preview version of WebView Runtime with your app. | Use your app daily with the preview version of WebView2 Runtime, to find issues before WebView2 changes reach Stable WebView2 Runtime. | See also: -* [Pre-release testing](https://docs.microsoft.com/microsoft-edge/webview2/how-to/pre-release-testing) +* [Prerelease testing using preview channels](./prerelease-testing.md) -## How to self-host preview channel of WebView2? -We recommend that you start selfhosting with the Dev channel of the WebView2 runtime in the Dev Channel of Microsoft Edge Browser. The Dev channel of the WebView2 runtime is updated weekly, and it allows you to catch issues early, while having sufficient stability for daily use. + +## How to self-host a preview channel of WebView2 + +We recommend that you start self-hosting by using the Dev channel of the WebView2 Runtime, which is in the Dev Channel of the Microsoft Edge browser. The Dev channel of the WebView2 Runtime is updated weekly, and it allows you to catch issues early, while having sufficient stability for daily use. The Canary channel is also suitable, but do note that it might be less stable. The Beta channel is available as well, but it is not recommended as you might not be able to catch issues early enough for your app. -You would need to set up the following: -1. [Set the preview channel for your app](#ways-to-set-the-preview-channel) -1. [Install the preview channel on your team's machines](#install-the-preview-channel-on-your-teams-machines -1. Use your app daily with the preview channel of WebView2, and [diagnose potential issues with the WebView2 Runtime](#diagnose-potential-issues-with-the-webview2-runtime) +To self-host a preview channel of WebView2: + +1. Set the preview channel for your app. See [Ways to set the preview channel](#ways-to-set-the-preview-channel), below. + +1. Install the preview channel on your team's machines. See [Install preview channels on your team's machines](#install-preview-channels-on-your-teams-machines), below. + +1. Use your app daily with the preview channel of WebView2, and diagnose potential issues with the WebView2 Runtime. See [Diagnose potential issues with the WebView2 Runtime](#diagnose-potential-issues-with-the-webview2-runtime), below. Upon finding issues, you can report them to the [Microsoft Edge WebView2 feedback repository](https://github.com/MicrosoftEdge/WebView2Feedback). + ## Ways to set the preview channel You can set the preview channel by doing either of the following: @@ -39,12 +50,14 @@ You can set the preview channel by doing either of the following: These options are explained below. + + ## Setting the preview channel by using ChannelSearchKind to set the channel search order The channel search kind controls the default channel search order. By default, the WebView2 loader searches for binaries from most-stable to least-stable (Canary), using the first binary that's found: ``` -WebView2 Runtime (Stable) -> Edge Beta -> Edge Dev -> Edge Canary +WebView2 Runtime (Stable) -> Edge Beta -> Edge Dev -> Edge Canary ``` To selfhost, you would reverse the channel search order, so that the loader looks for binaries in order from least-stable (Canary) to most-stable: @@ -57,7 +70,8 @@ The channel search kind can be set per app through a registry key, environment v The value `1` indicates reversed search order; that is, from least-stable (Edge Canary) to most-stable. -#### [Registry key](#tab/registry-key) + +##### [Registry key](#tab/registry-key) ```reg REG ADD \Software\Policies\Microsoft\Edge\WebView2\ChannelSearchKind /v WebView2APISample.exe /t REG_DWORD /d 1 @@ -65,26 +79,31 @@ REG ADD \Software\Policies\Microsoft\Edge\WebView2\ChannelSearchKind Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. -#### [Environment variable](#tab/environment-variable) -Name: `WEBVIEW2_CHANNEL_SEARCH_KIND` -Value: `1` +##### [Environment variable](#tab/environment-variable) + +* Name: `WEBVIEW2_CHANNEL_SEARCH_KIND` +* Value: `1` Note that the environment variable will be applied to all apps that use WebView2 on the machine, unlike the registry key, which can be set per app. -#### [Group policy](#tab/group-policy) + +##### [Group policy](#tab/group-policy) Set the `ChannelSearchKind` policy. -Name: `` -Value: `1` +* Name: `` +* Value: `1` Do either of the following: + * Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Click any of the three **Download Windows Policy** links. + * Use the built-in policy on Intune. --- + ## Setting the preview channel by using the browser executable folder @@ -104,32 +123,40 @@ REG ADD \Software\Policies\Microsoft\Edge\WebView2\BrowserExecutableF #### [Environment variable](#tab/environment-variable) -Name: `WEBVIEW2_BROWSER_EXECUTABLE_FOLDER` -Value: `` +* Name: `WEBVIEW2_BROWSER_EXECUTABLE_FOLDER` +* Value: `` + +Note that the environment variable will be applied to all apps that use WebView2 on the machine, unlike the registry key, which can be set per-app. -Note that the environment variable will be applied to all apps that use WebView2 on the machine, unlike the registry key, which can be set per app. #### [Group policy](#tab/group-policy) Set `BrowserExecutableFolder`. -Name: `` -Value: `` +* Name: `` +* Value: `` Download the Microsoft Edge policy files, which include the WebView2 policy files, from the Edge Enterprise site, or use the built-in policy on Intune. Do either of the following: + * Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Click any of the three **Download Windows Policy** links. + * Use the built-in policy on Intune. --- +## Install preview channels on your team's machines -## Install the preview channel on your team's machines +Insider channels of Microsoft Edge (which include WebView2) are also called preview channels. To install the preview channels of Microsoft Edge on your team's machines, you can either: +* Manually install preview channels on machines. +* Programmatically deploy preview channels via API. + +These options are explained below. -Insider channels -**Option 1: Manual install on machines** + +#### Option 1: Manually install preview channels on machines Insider channels can be manually installed through the following links: @@ -139,13 +166,15 @@ Insider channels can be manually installed through the following links: | Dev | [Download](https://go.microsoft.com/fwlink/?linkid=2093291) | | Beta | [Download](https://go.microsoft.com/fwlink/?linkid=2093376) | -This only needs to be done once per machine. Prerelease channels are evergreen so they will automatically get updated when newer versions are available. +This only needs to be done once per machine. Prerelease channels are evergreen, so they will automatically get updated when newer versions are available. -**Option 2: Programmatic depolyment through API** + + +#### Option 2: Programmatically deploy preview channels via API Periodically poll the following pages to get the latest version for each channel: -Note: Dev & Beta channels contain MSI Links, while Canary has a separate link +The Edge Dev and Edge Beta channels contain MSI Links. The Edge Canary channel has a separate MSI link. | Channel | Link | | --- | --- | @@ -153,36 +182,50 @@ Note: Dev & Beta channels contain MSI Links, while Canary has a separate link | Dev | [https://edgeupdates.microsoft.com/api/products/dev](https://edgeupdates.microsoft.com/api/products/dev) | | Beta | [https://edgeupdates.microsoft.com/api/products/beta](https://edgeupdates.microsoft.com/api/products/beta) | + + + + ## Diagnose potential issues with the WebView2 Runtime -**Confirm that your application is running preview WebView2** +To diagnose or troubleshoot potential prerelease WebView2 Runtime issues that are revealed by your app, use the following techniques. -1. Download [WebView2 Utilities](https://github.com/david-risney/WebView2Utilities), a toolkit that helps with debugging Microsoft Edge WebView2 apps. You can use the [ClickOnce Install](https://david-risney.github.io/WebView2Utilities/install/WebView2Utilities.application) on the page. -1. See if the executable of the app you want to investigate is in the left-hand pane, and select to read the runtime version of the app. The runtime channel should reflect a preview channel. + +#### Confirm that your app is running a preview channel of WebView2 -**Switch to stable channel WebView2 to see if the issue reproduces** +1. Download [WebView2 Utilities](https://github.com/david-risney/WebView2Utilities), a toolkit that helps with debugging Microsoft Edge WebView2 apps. You can use the [ClickOnce Install](https://david-risney.github.io/WebView2Utilities/install/WebView2Utilities.application) on the page. -If the issue does not reproduce on the stable channel, it is likely that the issue is with the preview channel of WebView2 or how the app interacts with the preview channel. +1. In the left-hand pane, select the executable of the app. Make sure the Runtime channel that's indicated is a preview channel (Canary, Dev, or Beta). -You can easily switch to the stable channel using environmental variables, as they override the registry settings (which are set by group policies), and this allows you to easily switch to a stable channel to see if the issue reproduces. If you are already using environmental variables, you will simply update the values. Do note that environment variables will change the channel for all apps that use WebView2 on the machine. -For `ChannelSearchKind` options, set the following: + +#### Switch to the Stable WebView2 Runtime channel to see if the issue reproduces -Name: `WEBVIEW2_CHANNEL_SEARCH_KIND` -Value: `0` +If the issue doesn't reproduce on the Stable channel of the WebView2 Runtime, it's likely that the issue is with the preview channel of WebView2, or how your app interacts with the preview channel of WebView2. + +You can easily switch to the stable channel (Stable WebView2 Runtime) by using environmental variables, because revised environment variables override the registry settings (which are set by group policies). This allows you to easily switch from a preview channel to the stable channel, to see if the issue reproduces. If you are already using environmental variables, you simply update the values. Note that changing the environment variables changes the WebView2 channel for all apps that use WebView2 on the machine. + +For `ChannelSearchKind` options, set the following: +* Name: `WEBVIEW2_CHANNEL_SEARCH_KIND` +* Value: `0` For `BrowserExecutableFolder` options, set the following: +* Name: `WEBVIEW2_BROWSER_EXECUTABLE_FOLDER` +* Value: `` + -Name: `WEBVIEW2_BROWSER_EXECUTABLE_FOLDER` -Value: `` + +#### Collect logs (reports) -**Collecting Logs** +Using the WebView2 Utilities, you can collect logs for the WebView2 Runtime and the app, as follows: -1. Using the WebView2 Utilities, you can collect logs for the WebView2 Runtime and the app. This can be done by selecting the app in the left-hand pane, and then selecting the `Create Report` button. -1. You can then report the issue to the [Microsoft Edge WebView2 feedback repository](https://github.com/MicrosoftEdge/WebView2Feedback). +1. Select the app in the left-hand pane, and then click the **Create Report** button. +1. You can then report the issue to the [Microsoft Edge WebView2 feedback repository](https://github.com/MicrosoftEdge/WebView2Feedback), and include the log file. + + ## See also * [Test upcoming APIs and features](./set-preview-channel.md) From c63728c622ddfd3a9b9bad7dd808fd33fd7a1002 Mon Sep 17 00:00:00 2001 From: Michael Hoffman Date: Thu, 15 Feb 2024 10:08:45 -0800 Subject: [PATCH 17/61] h5 for tabs --- .../webview2/how-to/prerelease-testing.md | 16 ++++++++-------- microsoft-edge/webview2/how-to/self-hosting.md | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/microsoft-edge/webview2/how-to/prerelease-testing.md b/microsoft-edge/webview2/how-to/prerelease-testing.md index dc77f1c94e..f6299fc260 100644 --- a/microsoft-edge/webview2/how-to/prerelease-testing.md +++ b/microsoft-edge/webview2/how-to/prerelease-testing.md @@ -82,7 +82,7 @@ The channel search kind can be set per app through a registry key, environment v The value `1` indicates reversed search order; that is, from least-stable (Edge Canary) to most-stable. -#### [Registry key](#tab/registry-key) +##### [Registry key](#tab/registry-key) ```reg REG ADD \Software\Policies\Microsoft\Edge\WebView2\ChannelSearchKind /v WebView2APISample.exe /t REG_DWORD /d 1 @@ -91,13 +91,13 @@ REG ADD \Software\Policies\Microsoft\Edge\WebView2\ChannelSearchKind Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. -#### [Environment variable](#tab/environment-variable) +##### [Environment variable](#tab/environment-variable) Name: `WEBVIEW2_CHANNEL_SEARCH_KIND` Value: `1` -#### [API](#tab/api) +##### [API](#tab/api) By default, the `CoreWebView2EnvironmentOptions.ChannelSearchKind` property is `CoreWebView2ChannelSearchKind.MostStable` (an enum value). Instead, reverse the search order by setting the `CoreWebView2EnvironmentOptions.ChannelSearchKind` property to `CoreWebView2ChannelSearchKind.LeastStable`. @@ -115,7 +115,7 @@ Win32: * [COREWEBVIEW2_CHANNEL_SEARCH_KIND enum](/microsoft-edge/webview2/reference/win32/webview2experimental-idl#corewebview2_channel_search_kind) -#### [Group policy](#tab/group-policy) +##### [Group policy](#tab/group-policy) Set the `ChannelSearchKind` policy. @@ -135,7 +135,7 @@ Do either of the following: The browser executable folder is the path to the folder that contains the WebView2 Runtime binaries. This option is useful if you're using a fixed Runtime. The browser executable folder path can be set per app through a registry key, environment variable, API, or group policy. -#### [Registry key](#tab/registry-key) +##### [Registry key](#tab/registry-key) ```reg REG ADD \Software\Policies\Microsoft\Edge\WebView2\BrowserExecutableFolder /v WebView2APISample.exe /t REG_SZ /d "C:\Users\myname\AppData\Local\Microsoft\Edge SxS\Application\88.0.680.0" @@ -146,13 +146,13 @@ REG ADD \Software\Policies\Microsoft\Edge\WebView2\BrowserExecutableF * Replace the example path with the path to the desired Microsoft Edge preview channel. -#### [Environment variable](#tab/environment-variable) +##### [Environment variable](#tab/environment-variable) Name: `WEBVIEW2_BROWSER_EXECUTABLE_FOLDER` Value: `` -#### [API](#tab/api) +##### [API](#tab/api) Pass the path to the browser executable folder during environment creation: @@ -176,7 +176,7 @@ Globals: * [ICoreWebView2EnvironmentOptions::put_AdditionalBrowserArguments](/microsoft-edge/webview2/reference/win32/icorewebview2environmentoptions#put_additionalbrowserarguments) -#### [Group policy](#tab/group-policy) +##### [Group policy](#tab/group-policy) Set `BrowserExecutableFolder`. diff --git a/microsoft-edge/webview2/how-to/self-hosting.md b/microsoft-edge/webview2/how-to/self-hosting.md index 60bd214df6..9b4eef5570 100644 --- a/microsoft-edge/webview2/how-to/self-hosting.md +++ b/microsoft-edge/webview2/how-to/self-hosting.md @@ -110,7 +110,7 @@ Do either of the following: The browser executable folder is the path to the folder that contains the WebView2 Runtime binaries. This option is useful if you're using a fixed Runtime. The browser executable folder path can be set per app through a registry key, environment variable, API, or group policy. -#### [Registry key](#tab/registry-key) +##### [Registry key](#tab/registry-key) ```reg REG ADD \Software\Policies\Microsoft\Edge\WebView2\BrowserExecutableFolder /v WebView2APISample.exe /t REG_SZ /d "C:\Users\myname\AppData\Local\Microsoft\Edge SxS\Application\88.0.680.0" @@ -121,7 +121,7 @@ REG ADD \Software\Policies\Microsoft\Edge\WebView2\BrowserExecutableF * Replace the sample path with the path to the desired Microsoft Edge preview channel. -#### [Environment variable](#tab/environment-variable) +##### [Environment variable](#tab/environment-variable) * Name: `WEBVIEW2_BROWSER_EXECUTABLE_FOLDER` * Value: `` @@ -129,7 +129,7 @@ REG ADD \Software\Policies\Microsoft\Edge\WebView2\BrowserExecutableF Note that the environment variable will be applied to all apps that use WebView2 on the machine, unlike the registry key, which can be set per-app. -#### [Group policy](#tab/group-policy) +##### [Group policy](#tab/group-policy) Set `BrowserExecutableFolder`. From c874a1aadc35fee406312392dbffa249b0e47bce Mon Sep 17 00:00:00 2001 From: Michael Hoffman Date: Fri, 23 Feb 2024 12:34:59 -0800 Subject: [PATCH 18/61] linkfix, link text --- microsoft-edge/webview2/how-to/self-hosting.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/microsoft-edge/webview2/how-to/self-hosting.md b/microsoft-edge/webview2/how-to/self-hosting.md index 9b4eef5570..9086bba0e5 100644 --- a/microsoft-edge/webview2/how-to/self-hosting.md +++ b/microsoft-edge/webview2/how-to/self-hosting.md @@ -6,7 +6,7 @@ ms.author: msedgedevrel ms.topic: conceptual ms.service: microsoft-edge ms.subservice: webview -ms.date: 02/15/2024 +ms.date: 02/23/2024 --- # Self-hosting by deploying preview channels @@ -229,7 +229,7 @@ Using the WebView2 Utilities, you can collect logs for the WebView2 Runtime and ## See also * [Test upcoming APIs and features](./set-preview-channel.md) -* [Pre-release testing](https://docs.microsoft.com/microsoft-edge/webview2/how-to/pre-release-testing) +* [Prerelease testing using preview channels](./prerelease-testing.md) * [WebView2 feedback repo](https://github.com/MicrosoftEdge/WebView2Feedback) -* [Site compatibility-impacting changes coming to Microsoft Edge](https://learn.microsoft.com/en-us/microsoft-edge/web-platform/site-impacting-changes) +* [Site compatibility-impacting changes coming to Microsoft Edge](../../web-platform/site-impacting-changes.md) * [Microsoft Edge Insider website](https://www.microsoft.com/edge/download/insider) - download the Canary, Dev, or Beta channel of Microsoft Edge From 71d0f914946ee3402456fb66e0a52cde151f568a Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Thu, 29 Feb 2024 11:19:17 -0800 Subject: [PATCH 19/61] Update pre-release testing --- .../webview2/how-to/prerelease-testing.md | 86 ++----------------- 1 file changed, 6 insertions(+), 80 deletions(-) diff --git a/microsoft-edge/webview2/how-to/prerelease-testing.md b/microsoft-edge/webview2/how-to/prerelease-testing.md index f6299fc260..a55623ae90 100644 --- a/microsoft-edge/webview2/how-to/prerelease-testing.md +++ b/microsoft-edge/webview2/how-to/prerelease-testing.md @@ -1,6 +1,6 @@ --- title: Prerelease testing using preview channels -description: How to test your WebView2 app by using the preview channels of Microsoft Edge (Edge Canary, Edge Dev, or Edge Beta) to find issues that will affect your particular WebView2 app, before WebView2 changes migrate to the Evergreen WebView2 Runtime. +description: How to test your WebView2 app by using the preview channels of Microsoft Edge (Edge Canary, Edge Dev, or Edge Beta) to find issues that will affect your particular WebView2 app, before WebView2 changes reach the Evergreen WebView2 Runtime. author: MSEdgeTeam ms.author: msedgedevrel ms.topic: conceptual @@ -10,7 +10,7 @@ ms.date: 02/15/2024 --- # Prerelease testing using preview channels -_Prerelease testing_ means testing your WebView2 app by using the preview channels of Microsoft Edge to find issues that will affect your particular WebView2 app, before WebView2 changes migrate to Evergreen WebView2 Runtime. Prerelease testing helps your app catch bugs in prerelease channels of WebView2, before the WebView2 changes ship in a stable release and degrade the app experience for end users. In prerelease testing, you validate your app against early builds of WebView2, to ensure that your app will work with the upcoming changes. +_Prerelease testing_ means testing your WebView2 app by using the preview channels of Microsoft Edge to find issues that will affect your particular WebView2 app, before any changes ship in the Stable Evergreen Runtime. Prerelease testing helps your app catch bugs in prerelease channels of WebView2, before the WebView2 changes ship in a stable release and degrade the app experience for end users. In prerelease testing, you validate your app against early builds of WebView2, to ensure that your app will work with the upcoming changes. To validate your app against early builds of WebView2, do automated testing with the preview channels of Microsoft Edge. A preview channel contains a WebView2 preview runtime. @@ -28,15 +28,9 @@ See also: ## Importance of prerelease testing -Evergreen WebView2 is based on the evergreen Chromium platform, which receives monthly major updates. To validate your own, particular app against incoming browser updates, test your WebView2 app against the prerelease channels of Microsoft Edge (Edge Canary, Edge Dev, or Edge Beta). Regressions in WebView2 apps tend to be application-specific, rather than affecting all WebView2 apps. - -The only way to catch app-specific regressions before WebView2 changes ship in Edge Stable is to test your particular app against the prerelease channels of Microsoft Edge. WebView2 is tested in a variety of general scenarios, but it's not feasible for that general testing to cover all the scenarios that various specific apps might encounter. - -Many issues in specific WebView2 apps can be discovered before WebView2 changes reach the Stable WebView2 Runtime, by doing prerelease testing, such as in Edge Canary. For example, the following issues have been caught: -- [Unable to open https://www.facebook.com, once load will directly ProcessFailed](https://github.com/MicrosoftEdge/WebView2Feedback/issues/4281) -- [MSEdgeWebView2 crashes when trying to preview a file through Monaco in file explorer using PowerToys](https://github.com/MicrosoftEdge/WebView2Feedback/issues/4228) -- [CoreWebView2PrintSettings.ScaleFactor is not working](https://github.com/MicrosoftEdge/WebView2Feedback/issues/4082) +Evergreen WebView2 is based on the evergreen Chromium platform, which receives monthly major updates. Regressions in WebView2 apps tend to be application-specific, rather than affecting all WebView2 apps. +To catch app-specific regressions before WebView2 changes ship in Edge Stable, test your particular app against the prerelease channels of Microsoft Edge. WebView2 is tested in a variety of general scenarios, but it's possible that some of the specific scenarios of your app are not covered. ## Start by doing automated testing against Edge Canary @@ -44,7 +38,7 @@ Many issues in specific WebView2 apps can be discovered before WebView2 changes Start with automated testing against the Microsoft Edge **Canary** channel, which ships daily. This enables you to catch issues as early as possible. The Microsoft Edge **Dev** channel ships weekly, and is also a good option. Do the following steps: -1. Set the preview channel for your app. See [Ways to set the preview channel](#ways-to-set-the-preview-channel), below. +1. Set the preview channel for your app. See [How set the preview channel](#how-to-set-the-preview-channel), below. 1. Deploy the non-stable channels. See [How to deploy non-stable channels](#how-to-deploy-non-stable-channels), below. 1. Conduct automated testing on your app running against the non-stable channels. See [How to do automated testing](#how-to-do-automated-testing), below. 1. Compare the results with the baseline. See [The baseline release of WebView2 for testing](#the-baseline-release-of-webview2-for-testing), below. @@ -53,14 +47,7 @@ Upon finding issues, you can report them via the [WebView2 feedback repo](https: -## Ways to set the preview channel - -You can set the preview channel by doing either of the following: -* Use `ChannelSearchKind` to set the channel search order. -* Use the browser executable folder. - -These options are explained below. - +## How to set the preview channel ## Setting the preview channel by using ChannelSearchKind to set the channel search order @@ -129,67 +116,6 @@ Do either of the following: --- - -## Setting the preview channel by using the browser executable folder - -The browser executable folder is the path to the folder that contains the WebView2 Runtime binaries. This option is useful if you're using a fixed Runtime. The browser executable folder path can be set per app through a registry key, environment variable, API, or group policy. - - -##### [Registry key](#tab/registry-key) - -```reg -REG ADD \Software\Policies\Microsoft\Edge\WebView2\BrowserExecutableFolder /v WebView2APISample.exe /t REG_SZ /d "C:\Users\myname\AppData\Local\Microsoft\Edge SxS\Application\88.0.680.0" -``` - -* Replace `WebView2APISample.exe` with your app's executable name, or with the application user model ID. - -* Replace the example path with the path to the desired Microsoft Edge preview channel. - - -##### [Environment variable](#tab/environment-variable) - -Name: `WEBVIEW2_BROWSER_EXECUTABLE_FOLDER` -Value: `` - - -##### [API](#tab/api) - -Pass the path to the browser executable folder during environment creation: - -**.NET:** - -* `CoreWebView2EnvironmentOptions` Class: - * [CoreWebView2EnvironmentOptions.AdditionalBrowserArguments Property](/dotnet/api/microsoft.web.webview2.core.corewebview2environmentoptions.additionalbrowserarguments) - -**WinRT:** - -* `CoreWebView2EnvironmentOptions` Class: - * [CoreWebView2EnvironmentOptions.AdditionalBrowserArguments Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2environmentoptions#additionalbrowserarguments) - -**Win32:** - -Globals: - * [CreateCoreWebView2EnvironmentWithOptions(browserExecutableFolder, userDataFolder, environmentOptions, environmentCreatedHandler)](/microsoft-edge/webview2/reference/win32/webview2-idl#createcorewebview2environmentwithoptions) - -* `ICoreWebView2EnvironmentOptions`: - * [ICoreWebView2EnvironmentOptions::get_AdditionalBrowserArguments](/microsoft-edge/webview2/reference/win32/icorewebview2environmentoptions#get_additionalbrowserarguments) - * [ICoreWebView2EnvironmentOptions::put_AdditionalBrowserArguments](/microsoft-edge/webview2/reference/win32/icorewebview2environmentoptions#put_additionalbrowserarguments) - - -##### [Group policy](#tab/group-policy) - -Set `BrowserExecutableFolder`. - -Name: `` -Value: `` - -Do either of the following: -* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Click any of the three **Download Windows Policy** links. -* Use the built-in policy on Intune. - ---- - - ## How to deploy non-stable channels From dfc3bfa326667c1c315ecc8d60435d29c6e2b11b Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Fri, 1 Mar 2024 11:28:37 -0800 Subject: [PATCH 20/61] Update selfhosting document --- .../webview2/how-to/self-hosting.md | 62 +++---------------- 1 file changed, 7 insertions(+), 55 deletions(-) diff --git a/microsoft-edge/webview2/how-to/self-hosting.md b/microsoft-edge/webview2/how-to/self-hosting.md index 9086bba0e5..42d09debec 100644 --- a/microsoft-edge/webview2/how-to/self-hosting.md +++ b/microsoft-edge/webview2/how-to/self-hosting.md @@ -10,14 +10,14 @@ ms.date: 02/23/2024 --- # Self-hosting by deploying preview channels -_Self-hosting_ means deploying a preview version of the WebView2 Runtime with your app. This allows you and your development team to use your app daily with the preview version of the WebView2 Runtime, to find issues that will affect your particular WebView2 app, before the forthcoming changes in the WebView2 Runtime preview migrate to the Evergreen WebView2 Runtime. +_Self-hosting_ means deploying a preview version of the WebView2 Runtime with your app. This allows you and your development team to use your app daily with the preview version of the WebView2 Runtime, to find issues that will affect your particular WebView2 app, before the forthcoming changes reach the Stable Evergreen WebView2 Runtime. The self-hosting approach provides real-world usage of your app with the latest prerelease version of the WebView2 Runtime, to catch any issues that may arise. Do this self-hosting approach in tandem with prerelease testing of your app, which instead provides a structured approach to testing your app with the latest version of the WebView2 Runtime. | Approach | Technique | Purpose/value | |---|---|---| -| Prerelease testing | todo | todo | -| Self-hosting | Deploy a preview version of WebView Runtime with your app. | Use your app daily with the preview version of WebView2 Runtime, to find issues before WebView2 changes reach Stable WebView2 Runtime. | +| Prerelease testing | Automated testing on a preview version of WebView2 Runtime with your app | Test your app with the preview version of in a structured way, to find issues before WebView2 changes reach Stable Evergreen Runtime | +| Self-hosting | Deploy a preview version of WebView2 Runtime with your app. | Use your app daily with the preview version of WebView2 Runtime, to find issues before WebView2 changes reach Stable Evergreen Runtime. | See also: * [Prerelease testing using preview channels](./prerelease-testing.md) @@ -32,7 +32,7 @@ The Canary channel is also suitable, but do note that it might be less stable. T To self-host a preview channel of WebView2: -1. Set the preview channel for your app. See [Ways to set the preview channel](#ways-to-set-the-preview-channel), below. +1. Set the preview channel for your app. See [Set the preview channel by using ChannelSearchKind](#set-the-preview-channel-by-using-channelsearchkind), below. 1. Install the preview channel on your team's machines. See [Install preview channels on your team's machines](#install-preview-channels-on-your-teams-machines), below. @@ -42,17 +42,10 @@ Upon finding issues, you can report them to the [Microsoft Edge WebView2 feedbac -## Ways to set the preview channel - -You can set the preview channel by doing either of the following: -* Use `ChannelSearchKind` to set the channel search order. -* Use the browser executable folder. - -These options are explained below. - +## Set the preview channel by using ChannelSearchKind -## Setting the preview channel by using ChannelSearchKind to set the channel search order + The channel search kind controls the default channel search order. By default, the WebView2 loader searches for binaries from most-stable to least-stable (Canary), using the first binary that's found: @@ -103,48 +96,6 @@ Do either of the following: --- - - -## Setting the preview channel by using the browser executable folder - -The browser executable folder is the path to the folder that contains the WebView2 Runtime binaries. This option is useful if you're using a fixed Runtime. The browser executable folder path can be set per app through a registry key, environment variable, API, or group policy. - - -##### [Registry key](#tab/registry-key) - -```reg -REG ADD \Software\Policies\Microsoft\Edge\WebView2\BrowserExecutableFolder /v WebView2APISample.exe /t REG_SZ /d "C:\Users\myname\AppData\Local\Microsoft\Edge SxS\Application\88.0.680.0" -``` - -* Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. - -* Replace the sample path with the path to the desired Microsoft Edge preview channel. - - -##### [Environment variable](#tab/environment-variable) - -* Name: `WEBVIEW2_BROWSER_EXECUTABLE_FOLDER` -* Value: `` - -Note that the environment variable will be applied to all apps that use WebView2 on the machine, unlike the registry key, which can be set per-app. - - -##### [Group policy](#tab/group-policy) - -Set `BrowserExecutableFolder`. - -* Name: `` -* Value: `` - -Download the Microsoft Edge policy files, which include the WebView2 policy files, from the Edge Enterprise site, or use the built-in policy on Intune. -Do either of the following: - -* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Click any of the three **Download Windows Policy** links. - -* Use the built-in policy on Intune. - ---- - ## Install preview channels on your team's machines @@ -194,6 +145,7 @@ To diagnose or troubleshoot potential prerelease WebView2 Runtime issues that ar #### Confirm that your app is running a preview channel of WebView2 + 1. Download [WebView2 Utilities](https://github.com/david-risney/WebView2Utilities), a toolkit that helps with debugging Microsoft Edge WebView2 apps. You can use the [ClickOnce Install](https://david-risney.github.io/WebView2Utilities/install/WebView2Utilities.application) on the page. 1. In the left-hand pane, select the executable of the app. Make sure the Runtime channel that's indicated is a preview channel (Canary, Dev, or Beta). From 81a346ac532879d6496a13a3b3a14d940287792f Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Fri, 1 Mar 2024 11:31:12 -0800 Subject: [PATCH 21/61] updating prerelease and selfhosting doc --- microsoft-edge/webview2/how-to/prerelease-testing.md | 6 +----- microsoft-edge/webview2/how-to/self-hosting.md | 5 +---- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/microsoft-edge/webview2/how-to/prerelease-testing.md b/microsoft-edge/webview2/how-to/prerelease-testing.md index a55623ae90..d569e44b35 100644 --- a/microsoft-edge/webview2/how-to/prerelease-testing.md +++ b/microsoft-edge/webview2/how-to/prerelease-testing.md @@ -38,17 +38,13 @@ To catch app-specific regressions before WebView2 changes ship in Edge Stable, t Start with automated testing against the Microsoft Edge **Canary** channel, which ships daily. This enables you to catch issues as early as possible. The Microsoft Edge **Dev** channel ships weekly, and is also a good option. Do the following steps: -1. Set the preview channel for your app. See [How set the preview channel](#how-to-set-the-preview-channel), below. +1. Set the preview channel for your app. See [Set the preview channel by using ChannelSearchKind](#set-the-preview-channel-by-using-channelsearchkind), below. 1. Deploy the non-stable channels. See [How to deploy non-stable channels](#how-to-deploy-non-stable-channels), below. 1. Conduct automated testing on your app running against the non-stable channels. See [How to do automated testing](#how-to-do-automated-testing), below. 1. Compare the results with the baseline. See [The baseline release of WebView2 for testing](#the-baseline-release-of-webview2-for-testing), below. Upon finding issues, you can report them via the [WebView2 feedback repo](https://github.com/MicrosoftEdge/WebView2Feedback). - - -## How to set the preview channel - ## Setting the preview channel by using ChannelSearchKind to set the channel search order diff --git a/microsoft-edge/webview2/how-to/self-hosting.md b/microsoft-edge/webview2/how-to/self-hosting.md index 42d09debec..30dee96dda 100644 --- a/microsoft-edge/webview2/how-to/self-hosting.md +++ b/microsoft-edge/webview2/how-to/self-hosting.md @@ -12,7 +12,7 @@ ms.date: 02/23/2024 _Self-hosting_ means deploying a preview version of the WebView2 Runtime with your app. This allows you and your development team to use your app daily with the preview version of the WebView2 Runtime, to find issues that will affect your particular WebView2 app, before the forthcoming changes reach the Stable Evergreen WebView2 Runtime. -The self-hosting approach provides real-world usage of your app with the latest prerelease version of the WebView2 Runtime, to catch any issues that may arise. Do this self-hosting approach in tandem with prerelease testing of your app, which instead provides a structured approach to testing your app with the latest version of the WebView2 Runtime. +The self-hosting approach provides real-world usage of your app with the latest prerelease version of the WebView2 Runtime, to catch any issues that may arise. You should self-hosting your app in tandem with doing prerelease testing on your app, which instead provides a structured approach to testing your app with the latest version of the WebView2 Runtime. | Approach | Technique | Purpose/value | |---|---|---| @@ -44,9 +44,6 @@ Upon finding issues, you can report them to the [Microsoft Edge WebView2 feedbac ## Set the preview channel by using ChannelSearchKind - - - The channel search kind controls the default channel search order. By default, the WebView2 loader searches for binaries from most-stable to least-stable (Canary), using the first binary that's found: ``` From 77f0f7ff99cc5669919470d4d08026fab6fb93ce Mon Sep 17 00:00:00 2001 From: Michael Hoffman Date: Fri, 1 Mar 2024 12:20:10 -0800 Subject: [PATCH 22/61] Writer/Editor pass on latest commits for 2 articles --- .../webview2/how-to/prerelease-testing.md | 28 ++++++++++----- .../webview2/how-to/self-hosting.md | 36 +++++++++++++++---- 2 files changed, 48 insertions(+), 16 deletions(-) diff --git a/microsoft-edge/webview2/how-to/prerelease-testing.md b/microsoft-edge/webview2/how-to/prerelease-testing.md index d569e44b35..61bcbfa7c4 100644 --- a/microsoft-edge/webview2/how-to/prerelease-testing.md +++ b/microsoft-edge/webview2/how-to/prerelease-testing.md @@ -6,7 +6,7 @@ ms.author: msedgedevrel ms.topic: conceptual ms.service: microsoft-edge ms.subservice: webview -ms.date: 02/15/2024 +ms.date: 03/01/2024 --- # Prerelease testing using preview channels @@ -28,9 +28,10 @@ See also: ## Importance of prerelease testing -Evergreen WebView2 is based on the evergreen Chromium platform, which receives monthly major updates. Regressions in WebView2 apps tend to be application-specific, rather than affecting all WebView2 apps. +Evergreen WebView2 is based on the evergreen Chromium platform, which receives monthly major updates. Regressions in WebView2 apps tend to be application-specific, rather than affecting all WebView2 apps. + +To catch app-specific regressions before WebView2 changes ship in Edge Stable, test your particular app against the prerelease channels of Microsoft Edge. WebView2 is tested in a variety of general scenarios, but it's possible that some of the specific scenarios of your app are not covered. -To catch app-specific regressions before WebView2 changes ship in Edge Stable, test your particular app against the prerelease channels of Microsoft Edge. WebView2 is tested in a variety of general scenarios, but it's possible that some of the specific scenarios of your app are not covered. ## Start by doing automated testing against Edge Canary @@ -38,17 +39,22 @@ To catch app-specific regressions before WebView2 changes ship in Edge Stable, t Start with automated testing against the Microsoft Edge **Canary** channel, which ships daily. This enables you to catch issues as early as possible. The Microsoft Edge **Dev** channel ships weekly, and is also a good option. Do the following steps: + 1. Set the preview channel for your app. See [Set the preview channel by using ChannelSearchKind](#set-the-preview-channel-by-using-channelsearchkind), below. + 1. Deploy the non-stable channels. See [How to deploy non-stable channels](#how-to-deploy-non-stable-channels), below. + 1. Conduct automated testing on your app running against the non-stable channels. See [How to do automated testing](#how-to-do-automated-testing), below. + 1. Compare the results with the baseline. See [The baseline release of WebView2 for testing](#the-baseline-release-of-webview2-for-testing), below. Upon finding issues, you can report them via the [WebView2 feedback repo](https://github.com/MicrosoftEdge/WebView2Feedback). + ## Setting the preview channel by using ChannelSearchKind to set the channel search order -The channel search kind controls the default channel search order. By default, the WebView2 loader searches for binaries from most-stable to least-stable (Canary), using the first binary that's found: +The channel search kind controls the channel search order. By default, the WebView2 loader searches for binaries from most-stable to least-stable (Canary), using the first binary that's found: ``` WebView2 Runtime (Stable) -> Edge Beta -> Edge Dev -> Edge Canary @@ -60,7 +66,7 @@ To do prerelease testing, reverse the channel search order, so that the loader l Edge Canary -> Edge Dev -> Edge Beta -> WebView2 Runtime (Stable) ``` -The channel search kind can be set per app through a registry key, environment variable, API, or group policy. +The channel search kind can be set per-app through a registry key, an environment variable, an API, or a group policy. The value `1` indicates reversed search order; that is, from least-stable (Edge Canary) to most-stable. @@ -79,6 +85,8 @@ Replace `WebView2APISample.exe` with your own app executable name or the applica Name: `WEBVIEW2_CHANNEL_SEARCH_KIND` Value: `1` +Note that the environment variable will be applied to all apps that use WebView2 on the machine, unlike the registry key, which can be set per app. + ##### [API](#tab/api) @@ -102,11 +110,13 @@ Win32: Set the `ChannelSearchKind` policy. -Name: `` -Value: `1` +* Name: `` +* Value: `1` Do either of the following: + * Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Click any of the three **Download Windows Policy** links. + * Use the built-in policy on Intune. --- @@ -115,9 +125,9 @@ Do either of the following: ## How to deploy non-stable channels -Preview channels of Microsoft Edge are also called _insider channels_. These are the non-stable channels of Microsoft Edge. +Preview channels of Microsoft Edge (which include WebView2) are also called _insider channels_. These are the non-stable channels of Microsoft Edge. -You can deploy a preview channel of Microsoft Edge by doing either of the following: +To deploy a preview channel of Microsoft Edge, do either of the following: * Manually install preview channels on test machines. * Programmatically deploy preview channels via API. diff --git a/microsoft-edge/webview2/how-to/self-hosting.md b/microsoft-edge/webview2/how-to/self-hosting.md index 30dee96dda..1326aa35d8 100644 --- a/microsoft-edge/webview2/how-to/self-hosting.md +++ b/microsoft-edge/webview2/how-to/self-hosting.md @@ -12,12 +12,12 @@ ms.date: 02/23/2024 _Self-hosting_ means deploying a preview version of the WebView2 Runtime with your app. This allows you and your development team to use your app daily with the preview version of the WebView2 Runtime, to find issues that will affect your particular WebView2 app, before the forthcoming changes reach the Stable Evergreen WebView2 Runtime. -The self-hosting approach provides real-world usage of your app with the latest prerelease version of the WebView2 Runtime, to catch any issues that may arise. You should self-hosting your app in tandem with doing prerelease testing on your app, which instead provides a structured approach to testing your app with the latest version of the WebView2 Runtime. +The self-hosting approach provides real-world usage of your app with the latest prerelease version of the WebView2 Runtime, to catch any issues that may arise. You should self-host your app in tandem with doing prerelease testing on your app, to provide a structured approach to testing your app with the latest version of the WebView2 Runtime. | Approach | Technique | Purpose/value | |---|---|---| -| Prerelease testing | Automated testing on a preview version of WebView2 Runtime with your app | Test your app with the preview version of in a structured way, to find issues before WebView2 changes reach Stable Evergreen Runtime | -| Self-hosting | Deploy a preview version of WebView2 Runtime with your app. | Use your app daily with the preview version of WebView2 Runtime, to find issues before WebView2 changes reach Stable Evergreen Runtime. | +| Prerelease testing | Automated testing on a preview version of WebView2 Runtime with your app. | Test your app with the preview version of in a structured way, to find issues before WebView2 changes reach the Stable Evergreen Runtime. | +| Self-hosting | Deploy a preview version of WebView2 Runtime with your app. | Use your app daily with the preview version of WebView2 Runtime, to find issues before WebView2 changes reach the Stable Evergreen Runtime. | See also: * [Prerelease testing using preview channels](./prerelease-testing.md) @@ -30,6 +30,7 @@ We recommend that you start self-hosting by using the Dev channel of the WebView The Canary channel is also suitable, but do note that it might be less stable. The Beta channel is available as well, but it is not recommended as you might not be able to catch issues early enough for your app. + To self-host a preview channel of WebView2: 1. Set the preview channel for your app. See [Set the preview channel by using ChannelSearchKind](#set-the-preview-channel-by-using-channelsearchkind), below. @@ -56,7 +57,7 @@ To selfhost, you would reverse the channel search order, so that the loader look Edge Canary -> Edge Dev -> Edge Beta -> WebView2 Runtime (Stable) ``` -The channel search kind can be set per app through a registry key, environment variable, API, or group policy. +The channel search kind can be set per app through a registry key, environment variable, API, or group policy. The value `1` indicates reversed search order; that is, from least-stable (Edge Canary) to most-stable. @@ -78,6 +79,25 @@ Replace `WebView2APISample.exe` with your own app executable name or the applica Note that the environment variable will be applied to all apps that use WebView2 on the machine, unlike the registry key, which can be set per app. +##### [API](#tab/api) + + +By default, the `CoreWebView2EnvironmentOptions.ChannelSearchKind` property is `CoreWebView2ChannelSearchKind.MostStable` (an enum value). Instead, reverse the search order by setting the `CoreWebView2EnvironmentOptions.ChannelSearchKind` property to `CoreWebView2ChannelSearchKind.LeastStable`. + +.NET: +* [CoreWebView2EnvironmentOptions.ChannelSearchKind Property](/dotnet/api/microsoft.web.webview2.core.corewebview2environmentoptions.channelsearchkind) +* [CoreWebView2ChannelSearchKind Enum](/dotnet/api/microsoft.web.webview2.core.corewebview2channelsearchkind) + +WinRT: +* [CoreWebView2EnvironmentOptions.ChannelSearchKind Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2environmentoptions#channelsearchkind) +* [CoreWebView2ChannelSearchKind Enum](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2channelsearchkind) + +Win32: +* [ICoreWebView2ExperimentalEnvironmentOptions::get_ChannelSearchKind](/microsoft-edge/webview2/reference/win32/icorewebview2experimentalenvironmentoptions#get_channelsearchkind) +* [ICoreWebView2ExperimentalEnvironmentOptions::put_ChannelSearchKind](/microsoft-edge/webview2/reference/win32/icorewebview2experimentalenvironmentoptions#put_channelsearchkind) +* [COREWEBVIEW2_CHANNEL_SEARCH_KIND enum](/microsoft-edge/webview2/reference/win32/webview2experimental-idl#corewebview2_channel_search_kind) + + ##### [Group policy](#tab/group-policy) Set the `ChannelSearchKind` policy. @@ -93,10 +113,13 @@ Do either of the following: --- + ## Install preview channels on your team's machines -Insider channels of Microsoft Edge (which include WebView2) are also called preview channels. To install the preview channels of Microsoft Edge on your team's machines, you can either: +Preview channels of Microsoft Edge (which include WebView2) are also called _insider channels_. These are the non-stable channels of Microsoft Edge. + +To install the preview channels of Microsoft Edge on your team's machines, do either of the following: * Manually install preview channels on machines. * Programmatically deploy preview channels via API. @@ -142,8 +165,7 @@ To diagnose or troubleshoot potential prerelease WebView2 Runtime issues that ar #### Confirm that your app is running a preview channel of WebView2 - -1. Download [WebView2 Utilities](https://github.com/david-risney/WebView2Utilities), a toolkit that helps with debugging Microsoft Edge WebView2 apps. You can use the [ClickOnce Install](https://david-risney.github.io/WebView2Utilities/install/WebView2Utilities.application) on the page. +1. Download [WebView2 Utilities](https://github.com/david-risney/WebView2Utilities), a toolkit that helps with debugging Microsoft Edge WebView2 apps. You can use the [ClickOnce Install](https://david-risney.github.io/WebView2Utilities/install/WebView2Utilities.application) on the page. 1. In the left-hand pane, select the executable of the app. Make sure the Runtime channel that's indicated is a preview channel (Canary, Dev, or Beta). From cc64e9857e1ff4e1790e9751884ed3628f9b49fa Mon Sep 17 00:00:00 2001 From: Michael Hoffman Date: Fri, 1 Mar 2024 12:27:51 -0800 Subject: [PATCH 23/61] API tab first --- .../webview2/how-to/prerelease-testing.md | 38 +++++++++---------- .../webview2/how-to/self-hosting.md | 36 +++++++++--------- 2 files changed, 37 insertions(+), 37 deletions(-) diff --git a/microsoft-edge/webview2/how-to/prerelease-testing.md b/microsoft-edge/webview2/how-to/prerelease-testing.md index 61bcbfa7c4..bccc4fb333 100644 --- a/microsoft-edge/webview2/how-to/prerelease-testing.md +++ b/microsoft-edge/webview2/how-to/prerelease-testing.md @@ -52,7 +52,7 @@ Upon finding issues, you can report them via the [WebView2 feedback repo](https: -## Setting the preview channel by using ChannelSearchKind to set the channel search order +## Set the preview channel by using ChannelSearchKind The channel search kind controls the channel search order. By default, the WebView2 loader searches for binaries from most-stable to least-stable (Canary), using the first binary that's found: @@ -66,28 +66,11 @@ To do prerelease testing, reverse the channel search order, so that the loader l Edge Canary -> Edge Dev -> Edge Beta -> WebView2 Runtime (Stable) ``` -The channel search kind can be set per-app through a registry key, an environment variable, an API, or a group policy. +The channel search kind can be set per-app through an API, a registry key, an environment variable, or a group policy. The value `1` indicates reversed search order; that is, from least-stable (Edge Canary) to most-stable. -##### [Registry key](#tab/registry-key) - -```reg -REG ADD \Software\Policies\Microsoft\Edge\WebView2\ChannelSearchKind /v WebView2APISample.exe /t REG_DWORD /d 1 -``` - -Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. - - -##### [Environment variable](#tab/environment-variable) - -Name: `WEBVIEW2_CHANNEL_SEARCH_KIND` -Value: `1` - -Note that the environment variable will be applied to all apps that use WebView2 on the machine, unlike the registry key, which can be set per app. - - ##### [API](#tab/api) By default, the `CoreWebView2EnvironmentOptions.ChannelSearchKind` property is `CoreWebView2ChannelSearchKind.MostStable` (an enum value). Instead, reverse the search order by setting the `CoreWebView2EnvironmentOptions.ChannelSearchKind` property to `CoreWebView2ChannelSearchKind.LeastStable`. @@ -106,6 +89,23 @@ Win32: * [COREWEBVIEW2_CHANNEL_SEARCH_KIND enum](/microsoft-edge/webview2/reference/win32/webview2experimental-idl#corewebview2_channel_search_kind) +##### [Registry key](#tab/registry-key) + +```reg +REG ADD \Software\Policies\Microsoft\Edge\WebView2\ChannelSearchKind /v WebView2APISample.exe /t REG_DWORD /d 1 +``` + +Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. + + +##### [Environment variable](#tab/environment-variable) + +Name: `WEBVIEW2_CHANNEL_SEARCH_KIND` +Value: `1` + +Note that the environment variable will be applied to all apps that use WebView2 on the machine, unlike the registry key, which can be set per app. + + ##### [Group policy](#tab/group-policy) Set the `ChannelSearchKind` policy. diff --git a/microsoft-edge/webview2/how-to/self-hosting.md b/microsoft-edge/webview2/how-to/self-hosting.md index 1326aa35d8..e57a5b9d42 100644 --- a/microsoft-edge/webview2/how-to/self-hosting.md +++ b/microsoft-edge/webview2/how-to/self-hosting.md @@ -57,28 +57,11 @@ To selfhost, you would reverse the channel search order, so that the loader look Edge Canary -> Edge Dev -> Edge Beta -> WebView2 Runtime (Stable) ``` -The channel search kind can be set per app through a registry key, environment variable, API, or group policy. +The channel search kind can be set per app through an API, a registry key, an environment variable, or a group policy. The value `1` indicates reversed search order; that is, from least-stable (Edge Canary) to most-stable. -##### [Registry key](#tab/registry-key) - -```reg -REG ADD \Software\Policies\Microsoft\Edge\WebView2\ChannelSearchKind /v WebView2APISample.exe /t REG_DWORD /d 1 -``` - -Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. - - -##### [Environment variable](#tab/environment-variable) - -* Name: `WEBVIEW2_CHANNEL_SEARCH_KIND` -* Value: `1` - -Note that the environment variable will be applied to all apps that use WebView2 on the machine, unlike the registry key, which can be set per app. - - ##### [API](#tab/api) @@ -98,6 +81,23 @@ Win32: * [COREWEBVIEW2_CHANNEL_SEARCH_KIND enum](/microsoft-edge/webview2/reference/win32/webview2experimental-idl#corewebview2_channel_search_kind) +##### [Registry key](#tab/registry-key) + +```reg +REG ADD \Software\Policies\Microsoft\Edge\WebView2\ChannelSearchKind /v WebView2APISample.exe /t REG_DWORD /d 1 +``` + +Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. + + +##### [Environment variable](#tab/environment-variable) + +* Name: `WEBVIEW2_CHANNEL_SEARCH_KIND` +* Value: `1` + +Note that the environment variable will be applied to all apps that use WebView2 on the machine, unlike the registry key, which can be set per app. + + ##### [Group policy](#tab/group-policy) Set the `ChannelSearchKind` policy. From 4440081742575b400dda5ea0db54fd76644860a0 Mon Sep 17 00:00:00 2001 From: Michael Hoffman Date: Fri, 1 Mar 2024 12:53:10 -0800 Subject: [PATCH 24/61] linkfix, api is preferred way --- microsoft-edge/webview2/how-to/prerelease-testing.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/microsoft-edge/webview2/how-to/prerelease-testing.md b/microsoft-edge/webview2/how-to/prerelease-testing.md index bccc4fb333..f9f7e27996 100644 --- a/microsoft-edge/webview2/how-to/prerelease-testing.md +++ b/microsoft-edge/webview2/how-to/prerelease-testing.md @@ -66,13 +66,15 @@ To do prerelease testing, reverse the channel search order, so that the loader l Edge Canary -> Edge Dev -> Edge Beta -> WebView2 Runtime (Stable) ``` -The channel search kind can be set per-app through an API, a registry key, an environment variable, or a group policy. +The channel search kind can be set per-app through an API, a registry key, an environment variable, or a group policy. Using the API is the recommended approach. The value `1` indicates reversed search order; that is, from least-stable (Edge Canary) to most-stable. ##### [API](#tab/api) +Using the API is the recommended approach. + By default, the `CoreWebView2EnvironmentOptions.ChannelSearchKind` property is `CoreWebView2ChannelSearchKind.MostStable` (an enum value). Instead, reverse the search order by setting the `CoreWebView2EnvironmentOptions.ChannelSearchKind` property to `CoreWebView2ChannelSearchKind.LeastStable`. .NET: @@ -169,7 +171,7 @@ The Edge Dev and Edge Beta channels contain MSI Links. The Edge Canary channel ## How to do automated testing -See [Automate and test WebView2 apps with Microsoft Edge WebDriver](/microsoft-edge/webdriver). +See [Automate and test WebView2 apps with Microsoft Edge WebDriver](./webdriver.md). From ba4960ae5f3f055a2c96657244b00944da56858d Mon Sep 17 00:00:00 2001 From: Michael Hoffman Date: Fri, 1 Mar 2024 13:03:15 -0800 Subject: [PATCH 25/61] API endpoints --- microsoft-edge/webview2/how-to/prerelease-testing.md | 8 +++----- microsoft-edge/webview2/how-to/self-hosting.md | 8 ++++---- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/microsoft-edge/webview2/how-to/prerelease-testing.md b/microsoft-edge/webview2/how-to/prerelease-testing.md index f9f7e27996..1628565fca 100644 --- a/microsoft-edge/webview2/how-to/prerelease-testing.md +++ b/microsoft-edge/webview2/how-to/prerelease-testing.md @@ -151,11 +151,9 @@ This only needs to be done once per machine. Prerelease channels are evergreen, -#### Option 2: Programmatically deploy preview channels via API +#### Option 2: Programmatically deploy preview channels via API endpoints - - -In your app's code, periodically poll the following pages to get and deploy the latest version of each preview channel of Microsoft Edge. +In your app's code, periodically poll the following API endpoints to get and deploy the latest version of each preview channel of Microsoft Edge: | Channel | Link | | --- | --- | @@ -165,7 +163,7 @@ In your app's code, periodically poll the following pages to get and deploy the The Edge Dev and Edge Beta channels contain MSI Links. The Edge Canary channel has a separate MSI link. - + diff --git a/microsoft-edge/webview2/how-to/self-hosting.md b/microsoft-edge/webview2/how-to/self-hosting.md index e57a5b9d42..49a46592be 100644 --- a/microsoft-edge/webview2/how-to/self-hosting.md +++ b/microsoft-edge/webview2/how-to/self-hosting.md @@ -141,11 +141,9 @@ This only needs to be done once per machine. Prerelease channels are evergreen, -#### Option 2: Programmatically deploy preview channels via API +#### Option 2: Programmatically deploy preview channels via API endpoints -Periodically poll the following pages to get the latest version for each channel: - -The Edge Dev and Edge Beta channels contain MSI Links. The Edge Canary channel has a separate MSI link. +In your app's code, periodically poll the following API endpoints to get and deploy the latest version of each preview channel of Microsoft Edge: | Channel | Link | | --- | --- | @@ -153,6 +151,8 @@ The Edge Dev and Edge Beta channels contain MSI Links. The Edge Canary channel | Dev | [https://edgeupdates.microsoft.com/api/products/dev](https://edgeupdates.microsoft.com/api/products/dev) | | Beta | [https://edgeupdates.microsoft.com/api/products/beta](https://edgeupdates.microsoft.com/api/products/beta) | +The Edge Dev and Edge Beta channels contain MSI Links. The Edge Canary channel has a separate MSI link. + From d49dc33137acf03f484f16c63f1d89beda50b29d Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Mon, 18 Mar 2024 15:57:32 -0700 Subject: [PATCH 26/61] Create a best practices section --- microsoft-edge/toc.yml | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/microsoft-edge/toc.yml b/microsoft-edge/toc.yml index 4bca01b81c..c8131243c1 100644 --- a/microsoft-edge/toc.yml +++ b/microsoft-edge/toc.yml @@ -1318,18 +1318,27 @@ - name: Test upcoming APIs and features href: webview2/how-to/set-preview-channel.md - - name: Prerelease testing using preview channels - href: webview2/how-to/prerelease-testing.md - - - name: Self-hosting by deploying preview channels - href: webview2/how-to/self-hosting.md - - name: Use Playwright to automate and test in WebView2 href: webview2/how-to/playwright.md - name: Automate and test WebView2 apps with Microsoft Edge WebDriver href: webview2/how-to/webdriver.md + - name: Best Practices + items: + - name: Development best practices + href: webview2/concepts/developer-guide.md + displayName: Development best practices for WebView2 apps # top-of-page title + + - name: Develop secure WebView2 apps + href: webview2/concepts/security.md + + - name: Prerelease testing using preview channels + href: webview2/how-to/prerelease-testing.md + + - name: Self-hosting by deploying preview channels + href: webview2/how-to/self-hosting.md + # ----------------------------------------------------------------------------- - name: Debug WebView2 apps items: @@ -1395,14 +1404,8 @@ href: webview2/concepts/clear-browsing-data.md # ----------------------------------------------------------------------------- - - name: Advanced Topics and Best Practices + - name: Advanced Topics items: - - name: Development best practices - href: webview2/concepts/developer-guide.md - displayName: Development best practices for WebView2 apps # top-of-page title - - - name: Develop secure WebView2 apps - href: webview2/concepts/security.md # - name: Customize the UI # not needed? flatten # items: From 81459b1e4a726b434f7d0c45875b684378f390ab Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Mon, 18 Mar 2024 15:59:04 -0700 Subject: [PATCH 27/61] Remove references to WV2 utils, and add alternative methods --- microsoft-edge/webview2/how-to/self-hosting.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/microsoft-edge/webview2/how-to/self-hosting.md b/microsoft-edge/webview2/how-to/self-hosting.md index 49a46592be..0bf74892ba 100644 --- a/microsoft-edge/webview2/how-to/self-hosting.md +++ b/microsoft-edge/webview2/how-to/self-hosting.md @@ -165,10 +165,11 @@ To diagnose or troubleshoot potential prerelease WebView2 Runtime issues that ar #### Confirm that your app is running a preview channel of WebView2 -1. Download [WebView2 Utilities](https://github.com/david-risney/WebView2Utilities), a toolkit that helps with debugging Microsoft Edge WebView2 apps. You can use the [ClickOnce Install](https://david-risney.github.io/WebView2Utilities/install/WebView2Utilities.application) on the page. +1. Open Task Manager -1. In the left-hand pane, select the executable of the app. Make sure the Runtime channel that's indicated is a preview channel (Canary, Dev, or Beta). +1. Find your application's process, then find the Edge WebView2 child process +1. Right click on the Edge WebView2 process, and then `Open file location`. The folder will be version number of the runtime. #### Switch to the Stable WebView2 Runtime channel to see if the issue reproduces @@ -187,11 +188,9 @@ For `BrowserExecutableFolder` options, set the following: -#### Collect logs (reports) +#### Collect diagnostics data -Using the WebView2 Utilities, you can collect logs for the WebView2 Runtime and the app, as follows: - -1. Select the app in the left-hand pane, and then click the **Create Report** button. +1. Refer to [Gathering Diagnostics and Logs](https://github.com/MicrosoftEdge/WebView2Feedback/tree/main/diagnostics) on how to gather diagnostic data. Crash dumps and ETW traces are the common ones we require. 1. You can then report the issue to the [Microsoft Edge WebView2 feedback repository](https://github.com/MicrosoftEdge/WebView2Feedback), and include the log file. From e6c2c2ad3c3c2e5ae35cebdca84ca157c7663ad5 Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Tue, 19 Mar 2024 15:00:09 -0700 Subject: [PATCH 28/61] Update test upcoming APIs and features --- .../webview2/how-to/set-preview-channel.md | 281 +++++++++--------- 1 file changed, 145 insertions(+), 136 deletions(-) diff --git a/microsoft-edge/webview2/how-to/set-preview-channel.md b/microsoft-edge/webview2/how-to/set-preview-channel.md index ecc886ccd5..70b474b292 100644 --- a/microsoft-edge/webview2/how-to/set-preview-channel.md +++ b/microsoft-edge/webview2/how-to/set-preview-channel.md @@ -12,26 +12,22 @@ ms.date: 02/09/2024 +To test new APIs and features, you would need to switch to a preview channel. The WebView2 Evergreen Runtime updates often to add new APIs and functionalities. - +**Why Use a Preview Channel?** The Evergreen WebView2 Runtime lacks the most recent experimental WebView2 APIs. To execute your WebView2 code with these experimental APIs, your app would need to run using WebView2 in an Edge preview channel (Beta, Dev, or Canary). We provide multiple methods to achieve this, and the Canary channel is recommended as it offers the latest experimental APIs. - - -To test upcoming APIs and features, you switch to a preview channel, as follows. - -Updates of the WebView2 Evergreen Runtime often include new APIs and features. Some of these updates could potentially break your WebView2 app. To test the experimental APIs ahead of time and ensure your app's forward-compatibility, you should perform compatibility testing using a preview channel of Microsoft Edge, along with a prerelease version of the WebView2 SDK. - -When you test a prerelease SDK package, you need to direct your application to use a preview channel of Microsoft Edge (Beta, Dev, or Canary), instead of defaulting to using the WebView2 Runtime. Several approaches for doing this are explained below. - -The WebView2 Runtime doesn't have the latest experimental WebView2 APIs. For your WebView2 code to run when using experimental APIs in a prerelease SDK, your client (on a development machine) needs to have a Microsoft Edge preview channel. The Canary preview channel is recommended, because it's ahead of the other channels and has the latest experimental APIs. - -The prerelease SDK works together with a preview channel as follows: +Interplay Between Prerelease SDK and Preview Channel: * A prerelease version of the WebView2 SDK contains the method signatures for experimental APIs, which allow you to write code using the experimental WebView2 APIs in your app. * The preview channels of Microsoft Edge contain the Microsoft Edge binaries that are needed to run and render your app, including the implementation of the experimental APIs. -For more information about how SDK versions works in conjunction with the WebView2 Runtime or preview channels of Microsoft Edge, see [Understand the different WebView2 SDK versions](../concepts/versioning.md). +For a deeper understanding of how SDK versions interact with the WebView2 Runtime and Microsoft Edge preview channels, refer to [Understand the different WebView2 SDK versions](../concepts/versioning.md). + +At the same time some of these updates could potentially break your WebView2 app, when the changes are shipped in the Evergreen WebView2 Runtime. We recommend that you test the experimental APIs ahead of time and ensure your app's forward-compatibility, by following these best practices: + +* [Prerelease testing using preview channels](./prerelease-testing.md) +* [Self-hosting by deploying preview channels](./self-hosting.md) @@ -42,29 +38,18 @@ To use experimental APIs, download a prerelease version of the WebView2 SDK from To download a Microsoft Edge preview channel, see [Microsoft Edge Insider Channels](https://www.microsoft.com/edge/download/insider). - + ## Approaches to making your app use a specific browser channel When a WebView2 is initialized, it will attempt to find a valid runtime on the machine to use. This can be the WebView2 Runtime, a preview channel of Microsoft Edge, or a specified location containing fixed version binaries. You can learn more about supported runtimes at [Distribute your app and the WebView2 Runtime](../concepts/distribution.md). There are several ways to make your WebView2 app use a specified preview channel of Microsoft Edge: -* By calling a function. -* By using a registry override. -* By using an environment variable. -* By using a group policy. +* By switching the channel search order (recommended) +* By setting the browser executable folder These approaches are described below. -### Browser executable folder - -One approach is to use a browser executable folder. In this approach, you specify a folder that contains runtime binaries. This folder can be any of the following locations: -* The installed location of the WebView2 Runtime. -* A preview channel of Microsoft Edge. -* A folder containing fixed version binaries that you have deployed to the machine yourself. - -If you set the browser executable folder to a specific preview channel of Microsoft Edge, you will need to update the location when that preview channel updates to a newer version. This is because the location includes the version number as part of its path. Therefore, we recommend using this approach for local testing only. - -### Default channel-search order +### Default channel-search order (recommended) This section applies to using a group policy, registry override, or environment variable. @@ -76,131 +61,129 @@ The default channel-search order is: 1. The Dev channel of Microsoft Edge. 1. The Canary channel of Microsoft Edge. -If you set the release channel preference to `1` by using a group policy, registry override, or environment variable, that will use the reverse of the default search order. +If you set the `ChannelSearchKind` to `1` by using an API, a group policy, registry override, or environment variable, that will use the reverse of the default search order. +##### [API](#tab/api) - -## Calling a function +By default, the `CoreWebView2EnvironmentOptions.ChannelSearchKind` property is `CoreWebView2ChannelSearchKind.MostStable` (an enum value). Instead, reverse the search order by setting the `CoreWebView2EnvironmentOptions.ChannelSearchKind` property to `CoreWebView2ChannelSearchKind.LeastStable`. -If you want to make your application use a specific runtime by calling a function, complete the following steps. +.NET: +* [CoreWebView2EnvironmentOptions.ChannelSearchKind Property](/dotnet/api/microsoft.web.webview2.core.corewebview2environmentoptions.channelsearchkind) +* [CoreWebView2ChannelSearchKind Enum](/dotnet/api/microsoft.web.webview2.core.corewebview2channelsearchkind) -### Win32\/C++ +WinRT: +* [CoreWebView2EnvironmentOptions.ChannelSearchKind Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2environmentoptions#channelsearchkind) +* [CoreWebView2ChannelSearchKind Enum](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2channelsearchkind) -We'll use the [WebView2APISample](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/SampleApps/WebView2APISample) to demonstrate this procedure. +Win32: +* [ICoreWebView2ExperimentalEnvironmentOptions::get_ChannelSearchKind](/microsoft-edge/webview2/reference/win32/icorewebview2experimentalenvironmentoptions#get_channelsearchkind) +* [ICoreWebView2ExperimentalEnvironmentOptions::put_ChannelSearchKind](/microsoft-edge/webview2/reference/win32/icorewebview2experimentalenvironmentoptions#put_channelsearchkind) +* [COREWEBVIEW2_CHANNEL_SEARCH_KIND enum](/microsoft-edge/webview2/reference/win32/webview2experimental-idl#corewebview2_channel_search_kind) -1. On your development machine, find the path containing the Microsoft Edge preview channel. For example: - `C:\\Users\\myname\\AppData\\Local\\Microsoft\\Edge SxS\\Application\\93.0.929.0` +##### [Registry key](#tab/registry-key) -1. Clone the [WebView2Samples](https://github.com/MicrosoftEdge/WebView2Samples) repo. - -1. Open the **WebView2APISample** project, and then in **Source Files**, open the `AppWindow.cpp` file. +1. Open a PowerShell terminal or PowerShell-enabled command prompt. -1. Find where [CreateCoreWebView2EnvironmentWithOptions](/microsoft-edge/webview2/reference/win32/webview2-idl#createcorewebview2environmentwithoptions) is called. For example: +1. Modify and then run the following command: - ```cpp - HRESULT hr = CreateCoreWebView2EnvironmentWithOptions( - subFolder, m_userDataFolder.c_str(), options.Get(), - Callback( - this, &AppWindow::OnCreateEnvironmentCompleted) - .Get()); + ```reg + REG ADD \Software\Policies\Microsoft\Edge\WebView2\ChannelSearchKind /v WebView2APISample.exe /t REG_DWORD /d 1 ``` -1. Replace the `subFolder` variable by the folder path for the Microsoft Edge preview channel you want to use. For example: +Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. Using a wildcard (*) as the value name will apply the override to _all_ WebView2 apps on the machine and can result in unexpected behavior. - ```cpp - HRESULT hr = CreateCoreWebView2EnvironmentWithOptions( - L"C:\\Users\\myname\\AppData\\Local\\Microsoft\\Edge SxS\\Application\\93.0.929.0", m_userDataFolder.c_str(), options.Get(), - Callback( - this, &AppWindow::OnCreateEnvironmentCompleted) - .Get()); - ``` -### WinForms - -WinForms uses an approach similar to the Win32/C++ approach described above. - -1. Set `CreationProperties.BrowserExecutableFolder` to point to the path that contains the Microsoft Edge Canary or Dev channel. To do this, in the **WebView2Samples** solution, in the **WebView2WpfBrowser** project, open the file `MainWindow.xaml.cs`. - -1. Find `CreationProperties.BrowserExecutableFolder`. For example: - - ```csharp - WebView2 GetReplacementControl(bool useNewEnvironment) - { - WebView2 replacementControl = new WebView2(); - ((System.ComponentModel.ISupportInitialize)(replacementControl)).BeginInit(); - // Setup properties and bindings. - if (useNewEnvironment) - { - // Create a new CoreWebView2CreationProperties instance so the environment - // is made anew. - replacementControl.CreationProperties = new CoreWebView2CreationProperties(); - replacementControl.CreationProperties.BrowserExecutableFolder = webView.CreationProperties.BrowserExecutableFolder; - replacementControl.CreationProperties.Language = webView.CreationProperties.Language; - replacementControl.CreationProperties.UserDataFolder = webView.CreationProperties.UserDataFolder; - shouldAttachEnvironmentEventHandlers = true; - } - ``` +##### [Environment variable](#tab/environment-variable) -### WPF +Name: `WEBVIEW2_CHANNEL_SEARCH_KIND` +Value: `1` -WPF uses an approach similar to the Win32/C++ approach described above. +Note that the environment variable will be applied to all apps that use WebView2 on the machine, unlike the registry key, which can be set per app. -See [CoreWebView2CreationProperties.BrowserExecutableFolder Property](/dotnet/api/microsoft.web.webview2.wpf.corewebview2creationproperties.browserexecutablefolder#Microsoft_Web_WebView2_Wpf_CoreWebView2CreationProperties_BrowserExecutableFolder). +##### [Group policy](#tab/group-policy) - -## Using a registry override +Set the `ChannelSearchKind` policy. -When specifying a preview channel by using a registry override, there are two options: -* Change the browser executable folder. -* Change the release channel preference. +* Name: `` +* Value: `1` -These two approaches are described below. +Do either of the following: -### Registry override: browser executable folder +* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Click any of the three **Download Windows Policy** links. Refer to [Configure Microsoft Edge policy settings on Windows devices](https://learn.microsoft.com/en-us/deployedge/configure-microsoft-edge) for more information. -To make your application use a Microsoft Edge preview channel by using a registry override that sets the browser executable folder: +* Use the built-in policy on Intune. Refer to [Configure Microsoft Edge policy settings in Microsoft Intune](https://learn.microsoft.com/en-us/mem/intune/configuration/administrative-templates-configure-edge) for more information. -1. Open a PowerShell terminal or PowerShell-enabled command prompt. +--- -1. Modify and then run the following command: - `REG ADD HKLM\Software\Policies\Microsoft\Edge\WebView2\BrowserExecutableFolder /v WebView2APISample.exe /t REG_SZ /d "C:\Users\myname\AppData\Local\Microsoft\Edge SxS\Application\88.0.680.0"` +### Browser executable folder - Replace `WebView2APISample.exe` with the file name of your own app executable or the Application User Model ID. Using a wildcard (*) as the value name will apply the override to _all_ WebView2 apps on the machine and can result in unexpected behavior. +One approach is to use a browser executable folder. In this approach, you specify a folder that contains runtime binaries. This folder can be any of the following locations: +* The installed location of the WebView2 Runtime. +* A preview channel of Microsoft Edge. +* A folder containing fixed version binaries that you have deployed to the machine yourself. + +If you set the browser executable folder to a specific preview channel of Microsoft Edge, you will need to update the location when that preview channel updates to a newer version. This is because the location includes the version number as part of its path. Therefore, we recommend using this approach for local testing only. + +##### [API](#tab/api) - Replace `C:\Users\myname\AppData\Local\Microsoft\Edge SxS\Application\88.0.680.0` by the path to the desired Microsoft Edge preview channel. +Pass the path to the browser executable folder during environment creation with the following APIs -#### Resuming using the default, WebView2 Evergreen Runtime +.NET (WPF): +* [CreationProperties Property](https://learn.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.wpf.webview2.creationproperties) +* [CoreWebView2CreationProperties Class](https://learn.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.wpf.corewebview2creationproperties) -To undo the above setting, run the following command: +.NET (WinForms): +* [CreationProperties Property](https://learn.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.winforms.webview2.creationproperties) +* [CoreWebView2CreationProperties Class](https://learn.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.winforms.corewebview2creationproperties) -`REG DELETE HKLM\Software\Policies\Microsoft\Edge\WebView2\BrowserExecutableFolder /f` +WinRT: + -### Registry override: release channel preference +Win32: +* [CreateCoreWebView2EnvironmentWithOptions](https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/webview2-idl?#createcorewebview2environmentwithoptions) -To make your application use a Microsoft Edge preview channel by using a registry override that changes the release channel preference by changing the order of searching for a channel: + +##### [Registry key](#tab/registry-key) 1. Open a PowerShell terminal or PowerShell-enabled command prompt. 1. Modify and then run the following command: - `REG ADD HKLM\Software\Policies\Microsoft\Edge\WebView2\ReleaseChannelPreference /v WebView2APISample.exe /t REG_SZ /d "1"` + ```reg + REG ADD \Software\Policies\Microsoft\Edge\WebView2\BrowserExecutableFolder /v WebView2APISample.exe /t REG_SZ /d "C:\Users\myname\AppData\Local\Microsoft\Edge SxS\Application\88.0.680.0" + ``` - Replace `WebView2APISample.exe` with the file name of your own app executable or the Application User Model ID. Using a wildcard (*) as the value name will apply the override to _all_ WebView2 apps on the machine and can result in unexpected behavior. +Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. Replace the sample path with the path to the desired Microsoft Edge preview channel. -#### Resuming using the default, WebView2 Evergreen Runtime +##### [Environment variable](#tab/environment-variable) -To delete the `ReleaseChannelPreference` registry override, run the command: +Name: `WEBVIEW2_BROWSER_EXECUTABLE_FOLDER` +Value: `` -`REG DELETE HKLM\Software\Policies\Microsoft\Edge\WebView2\ReleaseChannelPreference /f` +Note that the environment variable will be applied to all apps that use WebView2 on the machine, unlike the registry key, which can be set per app. +##### [Group policy](#tab/group-policy) - -## Using an environment variable +Set the `BrowserExecutableFolder` policy. -To make your application use a Microsoft Edge preview channel by using an environment variable: +Name: `` +Value: `` + +Do either of the following: + +* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Click any of the three **Download Windows Policy** links. Refer to [Configure Microsoft Edge policy settings on Windows devices](https://learn.microsoft.com/en-us/deployedge/configure-microsoft-edge) for more information. + +* Use the built-in policy on Intune. Refer to [Configure Microsoft Edge policy settings in Microsoft Intune](https://learn.microsoft.com/en-us/mem/intune/configuration/administrative-templates-configure-edge) for more information. + +--- + +## FAQs + + +### How to use use an environment variable 1. In the Windows search bar, enter "environment", and then select **Edit the system environment variables**. @@ -212,57 +195,83 @@ To make your application use a Microsoft Edge preview channel by using an enviro 1. In the **User variables** section of the **Environment Variables** dialog, select **New**. -1. In the **New User Variable** dialog, set the **Variable name** to `WEBVIEW2_BROWSER_EXECUTABLE_FOLDER`, and set the **Variable value** to the path to your preferred browser channel or fixed version binaries. +1. In the **New User Variable** dialog, set the **Variable name** to `WEBVIEW2_CHANNEL_SEARCH_KIND`, and set the **Variable value** to the path to your preferred browser channel or fixed version binaries. - Alternatively, set the **Variable name** to `WEBVIEW2_RELEASE_CHANNEL_PREFERENCE`, and set the **Variable value** to `1` to reverse the search order, to use preview channels (Beta, Dev, or Canary) first. Any value besides `1` indicates the default search order. + Alternatively, set the **Variable name** to `WEBVIEW2_CHANNEL_SEARCH_KIND`, and set the **Variable value** to `1` to reverse the search order, to use preview channels (Beta, Dev, or Canary) first. Any value besides `1` indicates the default search order. 1. Click **OK** to close the dialogs. - ![Adding a new environment variable, as a user variable](./set-preview-channel-images/env-vars-new-user-variable.png) -### Which app is affected +### When does the new runtime get picked up? + +If you are using an environment variable / reg key / grou policy, they are only applied to any new processes that are created, they do not apply to processes which are already running. To ensure that all processes use the you would need to restart the processes. + +### When using `ChannelSearchKind`, how do I make sure the right channel is picked up when I have multiple preview browser channels? + +In addition to reversing the channel search order, you can modify the release channels set for further control over channel selection. The loader will search for channels on the device according to the channel search kind, but it will only consider channels in the set. + +This option is useful if you would like to target a particular channel instead of simply choosing the least stable one. By default, release channels includes all channels: Stable (0), Beta (1), Dev (2), and Canary (3). + +Example: +``` +Channel Search Kind: 1 (Least Stable) +Release Channels: 0 (Stable), 1 (Beta) +``` + +With this setting, the loader will try to run the app with Edge Beta if it is installed on the device, and otherwise fall back on the Stable WebView2 Runtime. -The above approach sets the environment variable for all WebView2 apps, not just the app you're testing. To set this environment variable for only the WebView2 app which you are testing, if you're running your app from the command prompt, set the environment variable `WEBVIEW2_RELEASE_CHANNEL_PREFERENCE=1`. That sets the environment variable just for the current `cmd.exe` command-prompt process and for any new child processes from that `cmd.exe` instance. Then the environment variable only applies to the WebView2 app that you're testing. +The release channels can similarly be set through the registry key, environment variable, API, or group policy. -If you use the `WEBVIEW2_RELEASE_CHANNEL_PREFERENCE` environment variable, you can set it to the following values. +##### [API](#tab/api) -| Value | Description | -|---|---| -| `1` | Reverses the search order, to use [preview channels](https://www.microsoft.com/edge/download/insider) first, before the WebView2 Runtime. | -| `0` or another value other than `1` | Uses the [default channel-search order](#default-channel-search-order), which is to use the WebView2 Runtime before the preview channels. | +By default, the the loader considers all release channels. Set `ReleaseChannels` to a mask of the channels you would like the loader to search for. -### Applying the new environment variable to running processes +.NET: +* [CoreWebView2EnvironmentOptions.ReleaseChannels Property](/dotnet/api/microsoft.web.webview2.core.corewebview2environmentoptions.releasechannels) +* [CoreWebView2ReleaseChannels Enum](/dotnet/api/microsoft.web.webview2.core.corewebview2releasechannels) -After setting an environment variable, the environment variable is applied to any new processes that are created. The environment variable doesn't apply to processes which are already running. To ensure that all processes use the new environment variable, you may need to restart Visual Studio, or log out of Windows and then log in again. +WinRT: +* [CoreWebView2EnvironmentOptions.ReleaseChannels Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2environmentoptions#releasechannels) +* [CoreWebView2ChannelSearchKind Enum](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2releasechannels) +Win32: +* [ICoreWebView2ExperimentalEnvironmentOptions::get_ReleaseChannels](/microsoft-edge/webview2/reference/win32/icorewebview2experimentalenvironmentoptions#get_releasechannels) +* [ICoreWebView2ExperimentalEnvironmentOptions::put_ReleaseChannels](/microsoft-edge/webview2/reference/win32/icorewebview2experimentalenvironmentoptions#put_releasechannels) +* [COREWEBVIEW2_RELEASE_CHANNELS enum](/microsoft-edge/webview2/reference/win32/webview2experimental-idl#corewebview2_release_channels) - -## Using a group policy -If you want to make your application use a Microsoft Edge preview channel by using a group policy, copy ADMX and ADML files to the `PolicyDefinitions` folder, as follows. +##### [Registry key](#tab/registry-key) + +1. Open a PowerShell terminal or PowerShell-enabled command prompt. + +1. Modify and then run the following command: + + ```reg + REG ADD \Software\Policies\Microsoft\Edge\WebView2\ReleaseChannels /v WebView2APISample.exe /t REG_SZ /d "0,1" + ``` -1. Download the policy files from [Download and deploy Microsoft Edge for business](https://www.microsoft.com/edge/business/download). +Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. Using a wildcard (*) as the value name will apply the override to _all_ WebView2 apps on the machine and can result in unexpected behavior. -1. Copy the ADMX file into a Policy Definitions template folder, such as `C:\Windows\PolicyDefinitions`. -1. Copy the ADML file into a matching locale folder within the `Policy Definitions` folder, such as a `C:\Windows\PolicyDefinitions\en-us` folder. +##### [Environment variable](#tab/environment-variable) -1. Open the **Local Group Policy Editor**. To do this, in the Windows search bar, type "group policy", and then select **Edit group policy**. +Name: `WEBVIEW2_RELEASE_CHANNELS` +Value: `` -1. Expand **Local Computer Policy**, then **Computer Configuration** or **User Configuration**. Then expand **Administrative Templates** > **Microsoft Edge WebView2**. +Note that the environment variable will be applied to all apps that use WebView2 on the machine, unlike the registry key, which can be set per app. - ![Local Group Policy Editor dialog](./set-preview-channel-images/local-group-policy-editor.png) -1. Select **Browser Executable Folder**. The following screenshots apply to setting the **Browser Executable Folder**. Alternatively, select **Release Channel Preference**, which uses similar dialogs. +##### [Group policy](#tab/group-policy) - ![Setting the Browser Executable Folder](./set-preview-channel-images/browser-executable-folder.png) +Set the `ReleaseChannel` policy. -1. Select the **Show** button. +* Name: `` +* Value: `` -1. Fill-in the **Show Contents** dialog. In the **Value name** column, enter your app's `.exe` file name or Application User Model ID. Using a wildcard (*) as the value name will apply the override to _all_ WebView2 apps on the machine and can result in unexpected behavior. +Do either of the following: - ![The Show Contents dialog](./set-preview-channel-images/show-contents.png) +* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Click any of the three **Download Windows Policy** links. Refer to [Configure Microsoft Edge policy settings on Windows devices](https://learn.microsoft.com/en-us/deployedge/configure-microsoft-edge) for more information. -1. Select **OK** to close the dialogs. +* Use the built-in policy on Intune. Refer to [Configure Microsoft Edge policy settings in Microsoft Intune](https://learn.microsoft.com/en-us/mem/intune/configuration/administrative-templates-configure-edge) for more information. -For more information, see [Configure Microsoft Edge policy settings](/deployedge/configure-microsoft-edge). +--- \ No newline at end of file From 408da71f69611fec5599a0a300553887878f2d8d Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Tue, 19 Mar 2024 15:27:44 -0700 Subject: [PATCH 29/61] Update group policy instructions --- microsoft-edge/webview2/how-to/prerelease-testing.md | 4 ++-- microsoft-edge/webview2/how-to/self-hosting.md | 4 ++-- microsoft-edge/webview2/how-to/set-preview-channel.md | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/microsoft-edge/webview2/how-to/prerelease-testing.md b/microsoft-edge/webview2/how-to/prerelease-testing.md index 1628565fca..e292131b3b 100644 --- a/microsoft-edge/webview2/how-to/prerelease-testing.md +++ b/microsoft-edge/webview2/how-to/prerelease-testing.md @@ -117,9 +117,9 @@ Set the `ChannelSearchKind` policy. Do either of the following: -* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Click any of the three **Download Windows Policy** links. +* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Refer to [Configure Microsoft Edge policy settings on Windows devices](https://learn.microsoft.com/en-us/deployedge/configure-microsoft-edge) for more information. -* Use the built-in policy on Intune. +* Use the built-in policy on Intune. Refer to [Configure Microsoft Edge policy settings in Microsoft Intune](https://learn.microsoft.com/en-us/mem/intune/configuration/administrative-templates-configure-edge) for more information. --- diff --git a/microsoft-edge/webview2/how-to/self-hosting.md b/microsoft-edge/webview2/how-to/self-hosting.md index 0bf74892ba..664f6ff92e 100644 --- a/microsoft-edge/webview2/how-to/self-hosting.md +++ b/microsoft-edge/webview2/how-to/self-hosting.md @@ -107,9 +107,9 @@ Set the `ChannelSearchKind` policy. Do either of the following: -* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Click any of the three **Download Windows Policy** links. +* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Refer to [Configure Microsoft Edge policy settings on Windows devices](https://learn.microsoft.com/en-us/deployedge/configure-microsoft-edge) for more information. -* Use the built-in policy on Intune. +* Use the built-in policy on Intune. Refer to [Configure Microsoft Edge policy settings in Microsoft Intune](https://learn.microsoft.com/en-us/mem/intune/configuration/administrative-templates-configure-edge) for more information. --- diff --git a/microsoft-edge/webview2/how-to/set-preview-channel.md b/microsoft-edge/webview2/how-to/set-preview-channel.md index 70b474b292..818a1731ce 100644 --- a/microsoft-edge/webview2/how-to/set-preview-channel.md +++ b/microsoft-edge/webview2/how-to/set-preview-channel.md @@ -14,7 +14,7 @@ ms.date: 02/09/2024 --> To test new APIs and features, you would need to switch to a preview channel. The WebView2 Evergreen Runtime updates often to add new APIs and functionalities. -**Why Use a Preview Channel?** The Evergreen WebView2 Runtime lacks the most recent experimental WebView2 APIs. To execute your WebView2 code with these experimental APIs, your app would need to run using WebView2 in an Edge preview channel (Beta, Dev, or Canary). We provide multiple methods to achieve this, and the Canary channel is recommended as it offers the latest experimental APIs. +**Why use a preview channel of WebView2?** The Evergreen WebView2 Runtime lacks the most recent experimental WebView2 APIs. To run your WebView2 code with these experimental APIs, your app would need to use WebView2 in an Edge preview channel (Beta, Dev, or Canary). We provide multiple methods to achieve this, and the Canary channel is recommended as it offers the latest experimental APIs. Interplay Between Prerelease SDK and Preview Channel: @@ -24,7 +24,7 @@ Interplay Between Prerelease SDK and Preview Channel: For a deeper understanding of how SDK versions interact with the WebView2 Runtime and Microsoft Edge preview channels, refer to [Understand the different WebView2 SDK versions](../concepts/versioning.md). -At the same time some of these updates could potentially break your WebView2 app, when the changes are shipped in the Evergreen WebView2 Runtime. We recommend that you test the experimental APIs ahead of time and ensure your app's forward-compatibility, by following these best practices: +**Forward-compatibility testing using the preview channel** Some of these updates could potentially break your WebView2 app. We recommend that you test the experimental APIs ahead of time and ensure your app's forward-compatibility by following the best practices: * [Prerelease testing using preview channels](./prerelease-testing.md) * [Self-hosting by deploying preview channels](./self-hosting.md) @@ -174,7 +174,7 @@ Value: `` Do either of the following: -* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Click any of the three **Download Windows Policy** links. Refer to [Configure Microsoft Edge policy settings on Windows devices](https://learn.microsoft.com/en-us/deployedge/configure-microsoft-edge) for more information. +* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Refer to [Configure Microsoft Edge policy settings on Windows devices](https://learn.microsoft.com/en-us/deployedge/configure-microsoft-edge) for more information. * Use the built-in policy on Intune. Refer to [Configure Microsoft Edge policy settings in Microsoft Intune](https://learn.microsoft.com/en-us/mem/intune/configuration/administrative-templates-configure-edge) for more information. @@ -270,7 +270,7 @@ Set the `ReleaseChannel` policy. Do either of the following: -* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Click any of the three **Download Windows Policy** links. Refer to [Configure Microsoft Edge policy settings on Windows devices](https://learn.microsoft.com/en-us/deployedge/configure-microsoft-edge) for more information. +* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Refer to [Configure Microsoft Edge policy settings on Windows devices](https://learn.microsoft.com/en-us/deployedge/configure-microsoft-edge) for more information. * Use the built-in policy on Intune. Refer to [Configure Microsoft Edge policy settings in Microsoft Intune](https://learn.microsoft.com/en-us/mem/intune/configuration/administrative-templates-configure-edge) for more information. From 9ca90ff3f38edbdb09fdde7b950681c901753807 Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Tue, 19 Mar 2024 15:40:48 -0700 Subject: [PATCH 30/61] Remove two todos --- microsoft-edge/webview2/how-to/self-hosting.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/microsoft-edge/webview2/how-to/self-hosting.md b/microsoft-edge/webview2/how-to/self-hosting.md index 664f6ff92e..42753b0e4d 100644 --- a/microsoft-edge/webview2/how-to/self-hosting.md +++ b/microsoft-edge/webview2/how-to/self-hosting.md @@ -57,7 +57,7 @@ To selfhost, you would reverse the channel search order, so that the loader look Edge Canary -> Edge Dev -> Edge Beta -> WebView2 Runtime (Stable) ``` -The channel search kind can be set per app through an API, a registry key, an environment variable, or a group policy. +The channel search kind can be set per app through an API, a registry key, an environment variable, or a group policy. The value `1` indicates reversed search order; that is, from least-stable (Edge Canary) to most-stable. @@ -153,8 +153,6 @@ In your app's code, periodically poll the following API endpoints to get and dep The Edge Dev and Edge Beta channels contain MSI Links. The Edge Canary channel has a separate MSI link. - - ## Diagnose potential issues with the WebView2 Runtime From 2d865c7dee165efacc78bf897472a675869c7793 Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Tue, 19 Mar 2024 15:41:20 -0700 Subject: [PATCH 31/61] update todo in set preview channel --- microsoft-edge/webview2/how-to/set-preview-channel.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microsoft-edge/webview2/how-to/set-preview-channel.md b/microsoft-edge/webview2/how-to/set-preview-channel.md index 818a1731ce..9bbabbc687 100644 --- a/microsoft-edge/webview2/how-to/set-preview-channel.md +++ b/microsoft-edge/webview2/how-to/set-preview-channel.md @@ -140,7 +140,7 @@ Pass the path to the browser executable folder during environment creation with * [CoreWebView2CreationProperties Class](https://learn.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.winforms.corewebview2creationproperties) WinRT: - + Win32: * [CreateCoreWebView2EnvironmentWithOptions](https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/webview2-idl?#createcorewebview2environmentwithoptions) From 6b42e690d212c4ca61b333fd404bf4b83ce9fe3c Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Tue, 19 Mar 2024 15:41:37 -0700 Subject: [PATCH 32/61] Update todo --- microsoft-edge/webview2/how-to/prerelease-testing.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/microsoft-edge/webview2/how-to/prerelease-testing.md b/microsoft-edge/webview2/how-to/prerelease-testing.md index e292131b3b..fb15ebe8f3 100644 --- a/microsoft-edge/webview2/how-to/prerelease-testing.md +++ b/microsoft-edge/webview2/how-to/prerelease-testing.md @@ -105,8 +105,7 @@ Replace `WebView2APISample.exe` with your own app executable name or the applica Name: `WEBVIEW2_CHANNEL_SEARCH_KIND` Value: `1` -Note that the environment variable will be applied to all apps that use WebView2 on the machine, unlike the registry key, which can be set per app. - +Note that the environment variable will be applied to all apps that use WebView2 on the machine, unlike the registry key, which can be set per app. ##### [Group policy](#tab/group-policy) @@ -163,9 +162,6 @@ In your app's code, periodically poll the following API endpoints to get and dep The Edge Dev and Edge Beta channels contain MSI Links. The Edge Canary channel has a separate MSI link. - - - ## How to do automated testing From 3f64b031d69833e6d8730e26ab2855b19bc2bfc7 Mon Sep 17 00:00:00 2001 From: Michael Hoffman Date: Tue, 19 Mar 2024 18:39:39 -0700 Subject: [PATCH 33/61] linktrim --- .../webview2/how-to/prerelease-testing.md | 4 ++-- .../webview2/how-to/self-hosting.md | 4 ++-- .../webview2/how-to/set-preview-channel.md | 22 +++++++++---------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/microsoft-edge/webview2/how-to/prerelease-testing.md b/microsoft-edge/webview2/how-to/prerelease-testing.md index fb15ebe8f3..20b511b5b7 100644 --- a/microsoft-edge/webview2/how-to/prerelease-testing.md +++ b/microsoft-edge/webview2/how-to/prerelease-testing.md @@ -116,9 +116,9 @@ Set the `ChannelSearchKind` policy. Do either of the following: -* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Refer to [Configure Microsoft Edge policy settings on Windows devices](https://learn.microsoft.com/en-us/deployedge/configure-microsoft-edge) for more information. +* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Refer to [Configure Microsoft Edge policy settings on Windows devices](/deployedge/configure-microsoft-edge) for more information. -* Use the built-in policy on Intune. Refer to [Configure Microsoft Edge policy settings in Microsoft Intune](https://learn.microsoft.com/en-us/mem/intune/configuration/administrative-templates-configure-edge) for more information. +* Use the built-in policy on Intune. Refer to [Configure Microsoft Edge policy settings in Microsoft Intune](/mem/intune/configuration/administrative-templates-configure-edge) for more information. --- diff --git a/microsoft-edge/webview2/how-to/self-hosting.md b/microsoft-edge/webview2/how-to/self-hosting.md index 42753b0e4d..2d02315b53 100644 --- a/microsoft-edge/webview2/how-to/self-hosting.md +++ b/microsoft-edge/webview2/how-to/self-hosting.md @@ -107,9 +107,9 @@ Set the `ChannelSearchKind` policy. Do either of the following: -* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Refer to [Configure Microsoft Edge policy settings on Windows devices](https://learn.microsoft.com/en-us/deployedge/configure-microsoft-edge) for more information. +* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Refer to [Configure Microsoft Edge policy settings on Windows devices](/deployedge/configure-microsoft-edge) for more information. -* Use the built-in policy on Intune. Refer to [Configure Microsoft Edge policy settings in Microsoft Intune](https://learn.microsoft.com/en-us/mem/intune/configuration/administrative-templates-configure-edge) for more information. +* Use the built-in policy on Intune. Refer to [Configure Microsoft Edge policy settings in Microsoft Intune](/mem/intune/configuration/administrative-templates-configure-edge) for more information. --- diff --git a/microsoft-edge/webview2/how-to/set-preview-channel.md b/microsoft-edge/webview2/how-to/set-preview-channel.md index 9bbabbc687..cf64e2d2ad 100644 --- a/microsoft-edge/webview2/how-to/set-preview-channel.md +++ b/microsoft-edge/webview2/how-to/set-preview-channel.md @@ -111,9 +111,9 @@ Set the `ChannelSearchKind` policy. Do either of the following: -* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Click any of the three **Download Windows Policy** links. Refer to [Configure Microsoft Edge policy settings on Windows devices](https://learn.microsoft.com/en-us/deployedge/configure-microsoft-edge) for more information. +* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Click any of the three **Download Windows Policy** links. Refer to [Configure Microsoft Edge policy settings on Windows devices](/deployedge/configure-microsoft-edge) for more information. -* Use the built-in policy on Intune. Refer to [Configure Microsoft Edge policy settings in Microsoft Intune](https://learn.microsoft.com/en-us/mem/intune/configuration/administrative-templates-configure-edge) for more information. +* Use the built-in policy on Intune. Refer to [Configure Microsoft Edge policy settings in Microsoft Intune](/mem/intune/configuration/administrative-templates-configure-edge) for more information. --- @@ -132,18 +132,18 @@ If you set the browser executable folder to a specific preview channel of Micros Pass the path to the browser executable folder during environment creation with the following APIs .NET (WPF): -* [CreationProperties Property](https://learn.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.wpf.webview2.creationproperties) -* [CoreWebView2CreationProperties Class](https://learn.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.wpf.corewebview2creationproperties) +* [CreationProperties Property](/dotnet/api/microsoft.web.webview2.wpf.webview2.creationproperties) +* [CoreWebView2CreationProperties Class](/dotnet/api/microsoft.web.webview2.wpf.corewebview2creationproperties) .NET (WinForms): -* [CreationProperties Property](https://learn.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.winforms.webview2.creationproperties) -* [CoreWebView2CreationProperties Class](https://learn.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.winforms.corewebview2creationproperties) +* [CreationProperties Property](/dotnet/api/microsoft.web.webview2.winforms.webview2.creationproperties) +* [CoreWebView2CreationProperties Class](/dotnet/api/microsoft.web.webview2.winforms.corewebview2creationproperties) WinRT: Win32: -* [CreateCoreWebView2EnvironmentWithOptions](https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/webview2-idl?#createcorewebview2environmentwithoptions) +* [CreateCoreWebView2EnvironmentWithOptions](/microsoft-edge/webview2/reference/win32/webview2-idl?#createcorewebview2environmentwithoptions) ##### [Registry key](#tab/registry-key) @@ -174,9 +174,9 @@ Value: `` Do either of the following: -* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Refer to [Configure Microsoft Edge policy settings on Windows devices](https://learn.microsoft.com/en-us/deployedge/configure-microsoft-edge) for more information. +* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Refer to [Configure Microsoft Edge policy settings on Windows devices](/deployedge/configure-microsoft-edge) for more information. -* Use the built-in policy on Intune. Refer to [Configure Microsoft Edge policy settings in Microsoft Intune](https://learn.microsoft.com/en-us/mem/intune/configuration/administrative-templates-configure-edge) for more information. +* Use the built-in policy on Intune. Refer to [Configure Microsoft Edge policy settings in Microsoft Intune](/mem/intune/configuration/administrative-templates-configure-edge) for more information. --- @@ -270,8 +270,8 @@ Set the `ReleaseChannel` policy. Do either of the following: -* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Refer to [Configure Microsoft Edge policy settings on Windows devices](https://learn.microsoft.com/en-us/deployedge/configure-microsoft-edge) for more information. +* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Refer to [Configure Microsoft Edge policy settings on Windows devices](/deployedge/configure-microsoft-edge) for more information. -* Use the built-in policy on Intune. Refer to [Configure Microsoft Edge policy settings in Microsoft Intune](https://learn.microsoft.com/en-us/mem/intune/configuration/administrative-templates-configure-edge) for more information. +* Use the built-in policy on Intune. Refer to [Configure Microsoft Edge policy settings in Microsoft Intune](/mem/intune/configuration/administrative-templates-configure-edge) for more information. --- \ No newline at end of file From 413d539e0c1c044fe9859e6db92fe0eca1aaedc3 Mon Sep 17 00:00:00 2001 From: Michael Hoffman Date: Tue, 19 Mar 2024 19:56:13 -0700 Subject: [PATCH 34/61] Improve headings, Writer pass --- .../webview2/concepts/distribution.md | 4 +- .../webview2/concepts/versioning.md | 4 +- .../system-properties-env-vars.png | Bin 11740 -> 17552 bytes .../webview2/how-to/set-preview-channel.md | 125 ++++++++++++------ microsoft-edge/webview2/how-to/webdriver.md | 2 +- 5 files changed, 92 insertions(+), 43 deletions(-) diff --git a/microsoft-edge/webview2/concepts/distribution.md b/microsoft-edge/webview2/concepts/distribution.md index f5f81e3601..53516159b6 100644 --- a/microsoft-edge/webview2/concepts/distribution.md +++ b/microsoft-edge/webview2/concepts/distribution.md @@ -73,7 +73,7 @@ The [Download the WebView2 Runtime](https://developer.microsoft.com/microsoft-ed The Evergreen distribution mode is recommended for most apps. -* The **Evergreen Bootstrapper** section of the page provides a small Evergreen Runtime bootstrapper that runs on the client machine, for online users. The bootstrapper downloads and installs the appropriate WebView2 Evergreen Runtime onto the client. You can use the bootstrapper a couple different ways: +* The **Evergreen Bootstrapper** section of the page provides a small Evergreen Runtime bootstrapper that runs on the client machine, for online users. The bootstrapper downloads and installs the appropriate Evergreen WebView2 Runtime onto the client. You can use the bootstrapper a couple different ways: * Link to the bootstrapper, using a link that you obtain from the **Get the Link** button. Your app uses this link to programmatically download the bootstrapper onto the client and invoke the bootstrapper. This approach avoids the need to package the bootstrapper with your app. This approach has a dependency on Microsoft's Content Delivery Network (CDN), to get the bootstrapper. @@ -232,7 +232,7 @@ Alternatively, instead of programmatically downloading the bootstrapper on-deman If you have an offline deployment scenario, where app deployment has to work entirely offline, use the following workflow. -1. Download the Evergreen Standalone Installer from [Download the WebView2 Runtime](https://developer.microsoft.com/microsoft-edge/webview2#download-section) to your development machine. The Evergreen Standalone Installer installs the WebView2 Evergreen Runtime on the client. +1. Download the Evergreen Standalone Installer from [Download the WebView2 Runtime](https://developer.microsoft.com/microsoft-edge/webview2#download-section) to your development machine. The Evergreen Standalone Installer installs the Evergreen WebView2 Runtime on the client. 1. Include the Evergreen Standalone Installer in your app installer or updater. diff --git a/microsoft-edge/webview2/concepts/versioning.md b/microsoft-edge/webview2/concepts/versioning.md index 1bd27bd33b..a017af4fcb 100644 --- a/microsoft-edge/webview2/concepts/versioning.md +++ b/microsoft-edge/webview2/concepts/versioning.md @@ -100,7 +100,7 @@ On a development machine, the client must have either the Microsoft Edge preview ## Forward compatibility of APIs The WebView2 _release_ SDK has been forward-compatible ever since version 1 (that is, SDK version [1.0.622.22](../release-notes.md#1062222)). -You can update your WebView2 app to use the latest APIs from the most recent Release version of the SDK. Your app will continue to work on clients because clients automatically have the latest WebView2 Evergreen Runtime. +You can update your WebView2 app to use the latest APIs from the most recent Release version of the SDK. Your app will continue to work on clients because clients automatically have the latest Evergreen WebView2 Runtime. The WebView2 APIs in a Release SDK package are stable and forward-compatible. A WebView2 API works when using a WebView2 Runtime that has an equal or higher build number as the SDK build number in which the API was introduced. The build number is the third part of the four-part version number for the Webview2 SDK, and of the four-part version number for Microsoft Edge and the WebView2 Runtime. @@ -128,7 +128,7 @@ To try out new forthcoming features that are in development, use _Experimental_ The Experimental APIs in a WebView2 Prerelease SDK package aren't guaranteed to be forward-compatible, and might be removed in future Runtime updates. -For full support of Experimental APIs, use a Microsoft Edge preview channel, not the WebView2 Evergreen Runtime. When a Prerelease version of the WebView2 SDK is initially made available, that SDK only works with Microsoft Edge Canary. Soon after that, the Prerelease SDK also works with the Beta and Dev channels. +For full support of Experimental APIs, use a Microsoft Edge preview channel, not the Evergreen WebView2 Runtime. When a Prerelease version of the WebView2 SDK is initially made available, that SDK only works with Microsoft Edge Canary. Soon after that, the Prerelease SDK also works with the Beta and Dev channels. Use a Prerelease SDK to try out new, Experimental APIs early and provide feedback before the Experimental APIs are promoted to become Stable, forward-compatible APIs. diff --git a/microsoft-edge/webview2/how-to/set-preview-channel-images/system-properties-env-vars.png b/microsoft-edge/webview2/how-to/set-preview-channel-images/system-properties-env-vars.png index f5f932f3c3ced8b3bf219839b9732bce052af7be..19920ab668fd50eef5f507ed2b109d9728b61609 100644 GIT binary patch literal 17552 zcmb`vWmsEXyER&)v=k|Ap~Z_7DDJ@mrFe07D8=0^K%mef#Y%B6?gaNhaVJGWiUtZn zLUDr23D5Ix`_8-N+vohqwUTwM%&a-ryze>gF~&@|s9E>jSDxb3Dc`}S7FDCGwB!#yhrC5cz33jc_|4^Z{w|b6Ki^%1*QwgF*KcExQ5N$^SzB1-Sp-_@>+_Zo9RfGSu>4r zB$bh1$U5C~aB5rS%dccj*k#TX9P?Av|Mzwqbz%pCHVnJ_44 zN^JB&*j{Z}nlch_DoF0MdU4Jih;wi=Uw0@zB__^bxlc()R~>XaG%T#_{SR6?I@TA?VPXAv z|MYax=#L+_j*gE<41qo>i8ivEx0xsqDIyTTYQ`pCb7IaU6=U%pr!TAJHQE;h;29+p zEuHP}2+p=2Co0!tfOWalR;Hoa+`2$|g4Ji0Ml9J3kWM0(U!L8ufzC5gj`!?v3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/microsoft-edge/webview2/how-to/set-preview-channel.md b/microsoft-edge/webview2/how-to/set-preview-channel.md index cf64e2d2ad..64d316739f 100644 --- a/microsoft-edge/webview2/how-to/set-preview-channel.md +++ b/microsoft-edge/webview2/how-to/set-preview-channel.md @@ -6,25 +6,43 @@ ms.author: msedgedevrel ms.topic: conceptual ms.service: microsoft-edge ms.subservice: webview -ms.date: 02/09/2024 +ms.date: 03/19/2024 --- # Test upcoming APIs and features -To test new APIs and features, you would need to switch to a preview channel. The WebView2 Evergreen Runtime updates often to add new APIs and functionalities. -**Why use a preview channel of WebView2?** The Evergreen WebView2 Runtime lacks the most recent experimental WebView2 APIs. To run your WebView2 code with these experimental APIs, your app would need to use WebView2 in an Edge preview channel (Beta, Dev, or Canary). We provide multiple methods to achieve this, and the Canary channel is recommended as it offers the latest experimental APIs. +To test new or forthcoming APIs and features, you must switch to a preview channel of Microsoft Edge, instead of using the WebView2 Runtime. The Evergreen WebView2 Runtime is updated often, to add new APIs and functionalities, after APIs have been promoted from Experimental in a Prerelease WebView2 SDK to Stable in the WebView2 Release SDK. Some of the updates in the Evergreen WebView2 Runtime could potentially break your WebView2 app. -Interplay Between Prerelease SDK and Preview Channel: +We recommend that you test the Experimental APIs ahead of time, before they are promoted to Stable in the WebView2 Release SDK, by switching to a preview channel of Microsoft Edge (which includes WebView2), to ensure your app's forward compatibility. -* A prerelease version of the WebView2 SDK contains the method signatures for experimental APIs, which allow you to write code using the experimental WebView2 APIs in your app. +See also: +* [Phases of introducing APIs](../concepts/versioning.md#phases-of-introducing-apis) in _Understand the different WebView2 SDK versions_. + + + +#### Use a preview channel of WebView2 to test your app against the most recent experimental WebView2 APIs + +The Evergreen WebView2 Runtime lacks the most recent experimental WebView2 APIs. To run your WebView2 code with these experimental APIs, your app must use WebView2 in a Microsoft Edge preview channel (Edge Beta, Edge Dev, or Edge Canary). Multiple approaches are supported to achieve this. + +The Canary channel is recommended, because it offers the latest experimental APIs. + + + +#### Interplay between the WebView2 Prerelease SDK and the preview channels of Microsoft Edge + +* A Prerelease version of the WebView2 SDK contains the method signatures for experimental APIs, which allow you to write code using the experimental WebView2 APIs in your app. * The preview channels of Microsoft Edge contain the Microsoft Edge binaries that are needed to run and render your app, including the implementation of the experimental APIs. -For a deeper understanding of how SDK versions interact with the WebView2 Runtime and Microsoft Edge preview channels, refer to [Understand the different WebView2 SDK versions](../concepts/versioning.md). +For a deeper understanding of how SDK versions interact with the WebView2 Runtime and Microsoft Edge preview channels, see [Understand the different WebView2 SDK versions](../concepts/versioning.md). + -**Forward-compatibility testing using the preview channel** Some of these updates could potentially break your WebView2 app. We recommend that you test the experimental APIs ahead of time and ensure your app's forward-compatibility by following the best practices: + +#### Forward-compatibility testing by using the preview channel + +We recommend that you test the experimental APIs ahead of time, to ensure your app's forward compatibility, by following these best practices: * [Prerelease testing using preview channels](./prerelease-testing.md) * [Self-hosting by deploying preview channels](./self-hosting.md) @@ -38,18 +56,22 @@ To use experimental APIs, download a prerelease version of the WebView2 SDK from To download a Microsoft Edge preview channel, see [Microsoft Edge Insider Channels](https://www.microsoft.com/edge/download/insider). - + ## Approaches to making your app use a specific browser channel -When a WebView2 is initialized, it will attempt to find a valid runtime on the machine to use. This can be the WebView2 Runtime, a preview channel of Microsoft Edge, or a specified location containing fixed version binaries. You can learn more about supported runtimes at [Distribute your app and the WebView2 Runtime](../concepts/distribution.md). +When a WebView2 is initialized, it will attempt to find a valid runtime on the machine to use. This can be the WebView2 Runtime, a preview channel of Microsoft Edge, or a specified location containing Fixed Version binaries. For more information about supported runtimes, see [Distribute your app and the WebView2 Runtime](../concepts/distribution.md). -There are several ways to make your WebView2 app use a specified preview channel of Microsoft Edge: -* By switching the channel search order (recommended) -* By setting the browser executable folder +There are two ways to make your WebView2 app use a specified preview channel of Microsoft Edge: + +* [Switching the channel search order (recommended)](#switching-the-channel-search-order-recommended). + +* [Setting the browser executable folder (for local testing)](#setting-the-browser-executable-folder-for-local-testing). These approaches are described below. -### Default channel-search order (recommended) + + +## Switching the channel search order (recommended) This section applies to using a group policy, registry override, or environment variable. @@ -57,12 +79,13 @@ If a specific browser executable folder isn't specified, then the WebView2 will The default channel-search order is: 1. The WebView2 Runtime. -1. The Beta channel of Microsoft Edge. -1. The Dev channel of Microsoft Edge. -1. The Canary channel of Microsoft Edge. +1. Edge Beta; the Beta channel of Microsoft Edge. +1. Edge Dev; the Dev channel of Microsoft Edge. +1. Edge Canary; the Canary channel of Microsoft Edge. If you set the `ChannelSearchKind` to `1` by using an API, a group policy, registry override, or environment variable, that will use the reverse of the default search order. + ##### [API](#tab/api) By default, the `CoreWebView2EnvironmentOptions.ChannelSearchKind` property is `CoreWebView2ChannelSearchKind.MostStable` (an enum value). Instead, reverse the search order by setting the `CoreWebView2EnvironmentOptions.ChannelSearchKind` property to `CoreWebView2ChannelSearchKind.LeastStable`. @@ -118,18 +141,20 @@ Do either of the following: --- -### Browser executable folder + +## Setting the browser executable folder (for local testing) -One approach is to use a browser executable folder. In this approach, you specify a folder that contains runtime binaries. This folder can be any of the following locations: +An alternative approach is to use a browser executable folder. In this approach, you specify a folder that contains runtime binaries. This folder can be any of the following locations: * The installed location of the WebView2 Runtime. * A preview channel of Microsoft Edge. * A folder containing fixed version binaries that you have deployed to the machine yourself. If you set the browser executable folder to a specific preview channel of Microsoft Edge, you will need to update the location when that preview channel updates to a newer version. This is because the location includes the version number as part of its path. Therefore, we recommend using this approach for local testing only. + ##### [API](#tab/api) -Pass the path to the browser executable folder during environment creation with the following APIs +Pass the path to the browser executable folder during environment creation, by using the following APIs. .NET (WPF): * [CreationProperties Property](/dotnet/api/microsoft.web.webview2.wpf.webview2.creationproperties) @@ -140,7 +165,7 @@ Pass the path to the browser executable folder during environment creation with * [CoreWebView2CreationProperties Class](/dotnet/api/microsoft.web.webview2.winforms.corewebview2creationproperties) WinRT: - +* TBD Win32: * [CreateCoreWebView2EnvironmentWithOptions](/microsoft-edge/webview2/reference/win32/webview2-idl?#createcorewebview2environmentwithoptions) @@ -158,12 +183,14 @@ Win32: Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. Replace the sample path with the path to the desired Microsoft Edge preview channel. + ##### [Environment variable](#tab/environment-variable) Name: `WEBVIEW2_BROWSER_EXECUTABLE_FOLDER` Value: `` -Note that the environment variable will be applied to all apps that use WebView2 on the machine, unlike the registry key, which can be set per app. +The environment variable will be applied to all apps that use WebView2 on the machine, unlike the registry key, which can be set per app. + ##### [Group policy](#tab/group-policy) @@ -180,51 +207,67 @@ Do either of the following: --- + + ## FAQs + -### How to use use an environment variable +#### How to use an environment variable -1. In the Windows search bar, enter "environment", and then select **Edit the system environment variables**. +1. In the Windows search bar, enter "environment", and then select **Edit the system environment variables**: ![Using the Windows search bar to find where to edit environment variables](./set-preview-channel-images/search-bar-edit-sys-env-vars.png) -1. In the **System Properties** dialog, select the **Advanced** tab, and then select the **Environment Variables** button. + The **System Properties** dialog opens. + +1. Select the **Advanced** tab, and then click the **Environment Variables** button: ![The Environment Variables button in the System Properties dialog](./set-preview-channel-images/system-properties-env-vars.png) -1. In the **User variables** section of the **Environment Variables** dialog, select **New**. + The **Environment Variables** dialog opens. + +1. In the **User variables** section at the top, click the **New** button. The **New User Variable** dialog opens. + +1. In the **Variable name** text box, enter `WEBVIEW2_CHANNEL_SEARCH_KIND`. + +1. In the **Variable value** text box, do either of the following: + + * Enter the path to your preferred browser channel or fixed-version binaries. -1. In the **New User Variable** dialog, set the **Variable name** to `WEBVIEW2_CHANNEL_SEARCH_KIND`, and set the **Variable value** to the path to your preferred browser channel or fixed version binaries. + * Or, enter `1` to reverse the search order from the default, to use the preview channels first (Canary, Beta, then Dev), followed by the WebView2 Runtime. Any value other than `1` causes the default search order to be used (WebView2 Runtime, Edge Dev, Edge Beta, and then Edge Canary). - Alternatively, set the **Variable name** to `WEBVIEW2_CHANNEL_SEARCH_KIND`, and set the **Variable value** to `1` to reverse the search order, to use preview channels (Beta, Dev, or Canary) first. Any value besides `1` indicates the default search order. +1. Click the **OK** buttons to close the dialogs. -1. Click **OK** to close the dialogs. + +#### When does the new runtime get picked up? -### When does the new runtime get picked up? +If you are using an environment variable, registry key, or group policy, they are only applied to any new processes that are created; they do not apply to processes that are already running. To ensure that all processes use the environment variable, registry key, or group policy, you would need to restart the processes. -If you are using an environment variable / reg key / grou policy, they are only applied to any new processes that are created, they do not apply to processes which are already running. To ensure that all processes use the you would need to restart the processes. -### When using `ChannelSearchKind`, how do I make sure the right channel is picked up when I have multiple preview browser channels? + +#### When using `ChannelSearchKind`, how do I make sure the right channel is picked up when I have multiple preview browser channels? -In addition to reversing the channel search order, you can modify the release channels set for further control over channel selection. The loader will search for channels on the device according to the channel search kind, but it will only consider channels in the set. +In addition to reversing the channel search order, you can modify the set of release channels, to provide further control over channel selection. The loader will search for channels on the device according to the channel search kind, but it will only consider channels that are in the specified set of release channels. -This option is useful if you would like to target a particular channel instead of simply choosing the least stable one. By default, release channels includes all channels: Stable (0), Beta (1), Dev (2), and Canary (3). +This option is useful if you would like to target a particular channel, instead of simply choosing the least stable channel. By default, release channels includes all channels: Stable (0), Beta (1), Dev (2), and Canary (3). Example: + ``` Channel Search Kind: 1 (Least Stable) Release Channels: 0 (Stable), 1 (Beta) ``` -With this setting, the loader will try to run the app with Edge Beta if it is installed on the device, and otherwise fall back on the Stable WebView2 Runtime. +This example setting causes the loader to try to run the app with Edge Beta if Edge Beta is installed on the device, and otherwise fall back to using the Stable WebView2 Runtime. The release channels can similarly be set through the registry key, environment variable, API, or group policy. + ##### [API](#tab/api) -By default, the the loader considers all release channels. Set `ReleaseChannels` to a mask of the channels you would like the loader to search for. +By default, the loader considers all of the release channels. Set `ReleaseChannels` to a mask of the channels you would like the loader to search for. .NET: * [CoreWebView2EnvironmentOptions.ReleaseChannels Property](/dotnet/api/microsoft.web.webview2.core.corewebview2environmentoptions.releasechannels) @@ -250,7 +293,7 @@ Win32: REG ADD \Software\Policies\Microsoft\Edge\WebView2\ReleaseChannels /v WebView2APISample.exe /t REG_SZ /d "0,1" ``` -Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. Using a wildcard (*) as the value name will apply the override to _all_ WebView2 apps on the machine and can result in unexpected behavior. +Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. Using a wildcard (*) as the value name will apply the override to _all_ WebView2 apps on the machine, and can result in unexpected behavior. ##### [Environment variable](#tab/environment-variable) @@ -258,7 +301,7 @@ Replace `WebView2APISample.exe` with your own app executable name or the applica Name: `WEBVIEW2_RELEASE_CHANNELS` Value: `` -Note that the environment variable will be applied to all apps that use WebView2 on the machine, unlike the registry key, which can be set per app. +The environment variable is applied to all apps that use WebView2 on the machine, unlike the registry key, which can be set per app. ##### [Group policy](#tab/group-policy) @@ -274,4 +317,10 @@ Do either of the following: * Use the built-in policy on Intune. Refer to [Configure Microsoft Edge policy settings in Microsoft Intune](/mem/intune/configuration/administrative-templates-configure-edge) for more information. ---- \ No newline at end of file +--- + + + +## See also + +* [Phases of introducing APIs](../concepts/versioning.md#phases-of-introducing-apis) in _Understand the different WebView2 SDK versions_. diff --git a/microsoft-edge/webview2/how-to/webdriver.md b/microsoft-edge/webview2/how-to/webdriver.md index 2c354fff7f..ad16d00182 100644 --- a/microsoft-edge/webview2/how-to/webdriver.md +++ b/microsoft-edge/webview2/how-to/webdriver.md @@ -231,7 +231,7 @@ For more info about the `DebuggerAddress` property of the `EdgeOptions` object, 1. Complete the steps described in [Remote debugging UWP apps with Remote Tools for Microsoft Edge](./remote-debugging.md). - This WebView2 feature is currently only supported in the Canary preview channel of Microsoft Edge. Set the enviroment variable `WEBVIEW2_RELEASE_CHANNEL_PREFERENCE=1`, to ensure that the WebView2 version is Canary. For more information, see [Using an environment variable](./set-preview-channel.md#using-an-environment-variable) in _Test upcoming APIs and features_. + This WebView2 feature is currently only supported in the Canary preview channel of Microsoft Edge. Set the enviroment variable `WEBVIEW2_RELEASE_CHANNEL_PREFERENCE=1`, to ensure that the WebView2 version is Canary. For more information, see [Using an environment variable](./set-preview-channel.md#how-to-use-use-an-environment-variable) in _Test upcoming APIs and features_. ![Settings for UWP app](./webdriver-images/sample-uwp-settings.png) From ea031e9d5f0807a2e56c5ff7408dfb28475fb885 Mon Sep 17 00:00:00 2001 From: Michael Hoffman Date: Tue, 19 Mar 2024 20:05:26 -0700 Subject: [PATCH 35/61] anchor link fix --- .../webview2/how-to/set-preview-channel.md | 6 ++-- microsoft-edge/webview2/how-to/webdriver.md | 28 +++++++++++++------ 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/microsoft-edge/webview2/how-to/set-preview-channel.md b/microsoft-edge/webview2/how-to/set-preview-channel.md index 64d316739f..3f2d253326 100644 --- a/microsoft-edge/webview2/how-to/set-preview-channel.md +++ b/microsoft-edge/webview2/how-to/set-preview-channel.md @@ -201,9 +201,9 @@ Value: `` Do either of the following: -* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Refer to [Configure Microsoft Edge policy settings on Windows devices](/deployedge/configure-microsoft-edge) for more information. +* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). See [Configure Microsoft Edge policy settings on Windows devices](/deployedge/configure-microsoft-edge). -* Use the built-in policy on Intune. Refer to [Configure Microsoft Edge policy settings in Microsoft Intune](/mem/intune/configuration/administrative-templates-configure-edge) for more information. +* Use the built-in policy on Intune. See [Configure Microsoft Edge policy settings in Microsoft Intune](/mem/intune/configuration/administrative-templates-configure-edge). --- @@ -212,7 +212,7 @@ Do either of the following: ## FAQs - + #### How to use an environment variable 1. In the Windows search bar, enter "environment", and then select **Edit the system environment variables**: diff --git a/microsoft-edge/webview2/how-to/webdriver.md b/microsoft-edge/webview2/how-to/webdriver.md index ad16d00182..c4c9437a88 100644 --- a/microsoft-edge/webview2/how-to/webdriver.md +++ b/microsoft-edge/webview2/how-to/webdriver.md @@ -104,14 +104,18 @@ Microsoft Edge WebDriver launches your WebView2 app and automatically attaches t * The "attach" approach: In other scenarios, it's appropriate to attach Microsoft Edge WebDriver to a running WebView2 instance. You launch your app outside of Microsoft Edge WebDriver, and then attach Microsoft Edge WebDriver to a running WebView2 instance. This "attach" approach is for a WebView2 app that's not compatible with the "launch" approach. -### Approach 1: Letting Microsoft Edge WebDriver launch your WebView2 app + + +#### Approach 1: Letting Microsoft Edge WebDriver launch your WebView2 app If you have a simple app that creates a single WebView2 instance and that instance is active immediately upon launch, then you can use the "launch" approach; use [Step 4a: Letting Microsoft Edge WebDriver launch your WebView2 app](#step-4a-letting-microsoft-edge-webdriver-launch-your-webview2-app). In this scenario, there's one WebView2 instance, and it's available upon launch, without needing to navigate through any native UI. -### Approach 2: Attaching Microsoft Edge WebDriver to a running WebView2 app + + +#### Approach 2: Attaching Microsoft Edge WebDriver to a running WebView2 app If you have any situation that doesn't fit the "launch" scenario above, you should attach Microsoft Edge WebDriver to a running WebView2 instance (instead of letting Microsoft Edge WebDriver handle the WebView2 launch); use [Step 4b: Attaching Microsoft Edge WebDriver to a running WebView2 app](#step-4b-attaching-microsoft-edge-webdriver-to-a-running-webview2-app). @@ -202,7 +206,9 @@ Microsoft Edge WebDriver doesn't handle native UI automation, but here are some In addition to ensuring the WebView2 instance is activated, you need to set its `--remote-debugging-port` command-line parameter. We'll do this in the steps below. Microsoft Edge WebDriver will use this remote debugging port to connect to your WebView2 instance. -### Launching the WebView2 app with remote debugging enabled + + +#### Launching the WebView2 app with remote debugging enabled The next step happens when you're coding your app. You need to provide this extra command-line parameter when you're instantiating your WebView2 control. Enable remote debugging, as follows. @@ -212,7 +218,9 @@ The next step happens when you're coding your app. You need to provide this ext At this point, your app is running and its `--remote-debugging-port` command-line parameter has been set. Next, we'll attach Microsoft Edge WebDriver to the launched WebView2 app. -### Attaching Microsoft Edge WebDriver to the launched WebView2 app + + +#### Attaching Microsoft Edge WebDriver to the launched WebView2 app 1. Use the `EdgeOptions.DebuggerAddress` property to tell Microsoft Edge WebDriver to connect to the remote debugging port that you specified previously, instead of launching a new application: @@ -227,11 +235,13 @@ At `localhost:9222` above, the port number given on this line should match the p For more info about the `DebuggerAddress` property of the `EdgeOptions` object, see [EdgeOptions object](../../webdriver-chromium/capabilities-edge-options.md#edgeoptions-object). -### For UWP apps, attach Microsoft Edge WebDriver to WebView2 with Remote Tools -1. Complete the steps described in [Remote debugging UWP apps with Remote Tools for Microsoft Edge](./remote-debugging.md). + +#### For UWP apps, attach Microsoft Edge WebDriver to WebView2 with Remote Tools + +1. Do the steps in [Remote debugging UWP apps with Remote Tools for Microsoft Edge](./remote-debugging.md). - This WebView2 feature is currently only supported in the Canary preview channel of Microsoft Edge. Set the enviroment variable `WEBVIEW2_RELEASE_CHANNEL_PREFERENCE=1`, to ensure that the WebView2 version is Canary. For more information, see [Using an environment variable](./set-preview-channel.md#how-to-use-use-an-environment-variable) in _Test upcoming APIs and features_. + This WebView2 feature is currently only supported in the Canary preview channel of Microsoft Edge. Set the environment variable `WEBVIEW2_RELEASE_CHANNEL_PREFERENCE=1`, to ensure that the WebView2 version is Canary. For more information, see [Using an environment variable](./set-preview-channel.md#how-to-use-an-environment-variable) in _Test upcoming APIs and features_. ![Settings for UWP app](./webdriver-images/sample-uwp-settings.png) @@ -260,7 +270,9 @@ For more information about launching a WebView2 UWP app with Remote Tools, see [ Congratulations! You've successfully attached Microsoft Edge WebDriver to a running WebView2 app. -### UWP projects and debugging + + +#### UWP projects and debugging To configure the debug settings on launch, you must use the registry to enable debugging for all WebView2 processes on startup. Because of the way that UWP projects are launched, the WebDriver2 control is unable to automatically configure the debug settings on launch. Note that setting this registry key enables debugging support for all launched WebView2 processes while this environment variable is configured. From 4552532bfc2197c4ebc72d6716cbd46c196c7408 Mon Sep 17 00:00:00 2001 From: Viktoria Zlatinova Date: Tue, 9 Apr 2024 02:17:48 -0700 Subject: [PATCH 36/61] minor updates to set-preview-channel.md --- .../webview2/how-to/set-preview-channel.md | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/microsoft-edge/webview2/how-to/set-preview-channel.md b/microsoft-edge/webview2/how-to/set-preview-channel.md index 3f2d253326..76c87ce8f8 100644 --- a/microsoft-edge/webview2/how-to/set-preview-channel.md +++ b/microsoft-edge/webview2/how-to/set-preview-channel.md @@ -73,7 +73,7 @@ These approaches are described below. ## Switching the channel search order (recommended) -This section applies to using a group policy, registry override, or environment variable. +This section applies to using an API, registry override, environment variable, or group policy. If a specific browser executable folder isn't specified, then the WebView2 will attempt to load a runtime from one of the known default locations. @@ -83,8 +83,7 @@ The default channel-search order is: 1. Edge Dev; the Dev channel of Microsoft Edge. 1. Edge Canary; the Canary channel of Microsoft Edge. -If you set the `ChannelSearchKind` to `1` by using an API, a group policy, registry override, or environment variable, that will use the reverse of the default search order. - +You can reverse the default search order by setting the `ChannelSearchKind` API to `LeastStable`, or by setting the `ChannelSearchKind` policy, registry key, or environment variable to `1`. ##### [API](#tab/api) @@ -212,34 +211,6 @@ Do either of the following: ## FAQs - -#### How to use an environment variable - -1. In the Windows search bar, enter "environment", and then select **Edit the system environment variables**: - - ![Using the Windows search bar to find where to edit environment variables](./set-preview-channel-images/search-bar-edit-sys-env-vars.png) - - The **System Properties** dialog opens. - -1. Select the **Advanced** tab, and then click the **Environment Variables** button: - - ![The Environment Variables button in the System Properties dialog](./set-preview-channel-images/system-properties-env-vars.png) - - The **Environment Variables** dialog opens. - -1. In the **User variables** section at the top, click the **New** button. The **New User Variable** dialog opens. - -1. In the **Variable name** text box, enter `WEBVIEW2_CHANNEL_SEARCH_KIND`. - -1. In the **Variable value** text box, do either of the following: - - * Enter the path to your preferred browser channel or fixed-version binaries. - - * Or, enter `1` to reverse the search order from the default, to use the preview channels first (Canary, Beta, then Dev), followed by the WebView2 Runtime. Any value other than `1` causes the default search order to be used (WebView2 Runtime, Edge Dev, Edge Beta, and then Edge Canary). - -1. Click the **OK** buttons to close the dialogs. - - #### When does the new runtime get picked up? @@ -262,7 +233,7 @@ Release Channels: 0 (Stable), 1 (Beta) This example setting causes the loader to try to run the app with Edge Beta if Edge Beta is installed on the device, and otherwise fall back to using the Stable WebView2 Runtime. -The release channels can similarly be set through the registry key, environment variable, API, or group policy. +The release channels can similarly be set through the API, registry key, environment variable, or group policy. ##### [API](#tab/api) @@ -317,6 +288,35 @@ Do either of the following: * Use the built-in policy on Intune. Refer to [Configure Microsoft Edge policy settings in Microsoft Intune](/mem/intune/configuration/administrative-templates-configure-edge) for more information. + + +#### How to use an environment variable + +1. In the Windows search bar, enter "environment", and then select **Edit the system environment variables**: + + ![Using the Windows search bar to find where to edit environment variables](./set-preview-channel-images/search-bar-edit-sys-env-vars.png) + + The **System Properties** dialog opens. + +1. Select the **Advanced** tab, and then click the **Environment Variables** button: + + ![The Environment Variables button in the System Properties dialog](./set-preview-channel-images/system-properties-env-vars.png) + + The **Environment Variables** dialog opens. + +1. In the **User variables** section at the top, click the **New** button. The **New User Variable** dialog opens. + +1. In the **Variable name** text box, enter the environment variable name, either `WEBVIEW2_CHANNEL_SEARCH_KIND` or `WEBVIEW2_BROWSER_EXECUTABLE_FOLDER`. + +1. In the **Variable value** text box, do either of the following: + + * If setting the ChannelSearchKind, enter `1` to reverse the search order from the default, to use the preview channels first (Canary, Beta, then Dev), followed by the WebView2 Runtime. Any value other than `1` causes the default search order to be used (WebView2 Runtime, Edge Dev, Edge Beta, and then Edge Canary). + + * If setting the BrowserExecutableFolder, enter the path to your preferred browser channel or fixed-version binaries. + +1. Click the **OK** buttons to close the dialogs. + + --- From fd0a0764d3a66bbc0b04a183862d678cebf357f9 Mon Sep 17 00:00:00 2001 From: Michael Hoffman Date: Tue, 9 Apr 2024 07:48:44 -0700 Subject: [PATCH 37/61] Incorp/resolve 11 of 12 comments --- microsoft-edge/toc.yml | 2 +- .../webview2/how-to/prerelease-testing.md | 15 +++++++++------ microsoft-edge/webview2/how-to/self-hosting.md | 5 ++--- .../webview2/how-to/set-preview-channel.md | 4 ++-- .../webview2/samples/webview2_sample_uwp.md | 2 +- .../webview2/samples/webview2apissample.md | 2 +- 6 files changed, 16 insertions(+), 14 deletions(-) diff --git a/microsoft-edge/toc.yml b/microsoft-edge/toc.yml index 8895eaa3d4..ba612968ef 100644 --- a/microsoft-edge/toc.yml +++ b/microsoft-edge/toc.yml @@ -1339,7 +1339,7 @@ - name: Prerelease testing using preview channels href: webview2/how-to/prerelease-testing.md - - name: Self-hosting by deploying preview channels + - name: Self-host by deploying preview channels href: webview2/how-to/self-hosting.md # ----------------------------------------------------------------------------- diff --git a/microsoft-edge/webview2/how-to/prerelease-testing.md b/microsoft-edge/webview2/how-to/prerelease-testing.md index 20b511b5b7..722193cbf7 100644 --- a/microsoft-edge/webview2/how-to/prerelease-testing.md +++ b/microsoft-edge/webview2/how-to/prerelease-testing.md @@ -22,15 +22,15 @@ The preview (or "insider") channels of Microsoft Edge consist of: See also: * [Overview of the Microsoft Edge channels](/deployedge/microsoft-edge-channels) * [Become a Microsoft Edge Insider](https://www.microsoft.com/edge/download/insider) - download Edge Canary, Edge Dev, or Edge Beta -* [Self-hosting by deploying preview channels](./self-hosting.md) +* [Self-host by deploying preview channels](./self-hosting.md) ## Importance of prerelease testing -Evergreen WebView2 is based on the evergreen Chromium platform, which receives monthly major updates. Regressions in WebView2 apps tend to be application-specific, rather than affecting all WebView2 apps. +Evergreen WebView2 is based on the evergreen Chromium platform, which receives monthly major updates. Regressions in WebView2 apps tend to be application-specific, rather than affecting all WebView2 apps. WebView2 is tested in a variety of general scenarios, but it's possible that some of the specific scenarios of your app are not covered. -To catch app-specific regressions before WebView2 changes ship in Edge Stable, test your particular app against the prerelease channels of Microsoft Edge. WebView2 is tested in a variety of general scenarios, but it's possible that some of the specific scenarios of your app are not covered. +To catch app-specific regressions before WebView2 changes ship in Edge Stable, test your WebView2 app against the prerelease runtime that's shipped with the prerelease channels of Microsoft Edge (Edge Canary, Edge Dev, or Edge Beta). @@ -116,9 +116,11 @@ Set the `ChannelSearchKind` policy. Do either of the following: -* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Refer to [Configure Microsoft Edge policy settings on Windows devices](/deployedge/configure-microsoft-edge) for more information. +* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). For more information, see [Configure Microsoft Edge policy settings on Windows devices](/deployedge/configure-microsoft-edge). -* Use the built-in policy on Intune. Refer to [Configure Microsoft Edge policy settings in Microsoft Intune](/mem/intune/configuration/administrative-templates-configure-edge) for more information. +* Use the built-in policy on Intune. See the following articles. The steps for WebView2 are the same as for Microsoft Edge, except use the category "Microsoft Edge WebView2" instead of "Microsoft Edge". + * [Configure Microsoft Edge policy settings in Microsoft Intune](/mem/intune/configuration/administrative-templates-configure-edge) in the Microsoft Intune documentation. + * [Configure Microsoft Edge policy settings with Microsoft Intune](/deployedge/configure-edge-with-intune) in the Microsoft Edge Enterprise documentation. --- @@ -162,6 +164,7 @@ In your app's code, periodically poll the following API endpoints to get and dep The Edge Dev and Edge Beta channels contain MSI Links. The Edge Canary channel has a separate MSI link. + ## How to do automated testing @@ -177,7 +180,7 @@ The baseline for testing should be the latest stable release of WebView2. You c ## See also -* [Self-hosting by deploying preview channels](./self-hosting.md) +* [Self-host by deploying preview channels](./self-hosting.md) * [Test upcoming APIs and features](./set-preview-channel.md) * [Automate and test WebView2 apps with Microsoft Edge WebDriver](/microsoft-edge/webdriver) * [WebView2 feedback repo](https://github.com/MicrosoftEdge/WebView2Feedback) diff --git a/microsoft-edge/webview2/how-to/self-hosting.md b/microsoft-edge/webview2/how-to/self-hosting.md index 2d02315b53..060456dbc0 100644 --- a/microsoft-edge/webview2/how-to/self-hosting.md +++ b/microsoft-edge/webview2/how-to/self-hosting.md @@ -1,5 +1,5 @@ --- -title: Self-hosting by deploying preview channels +title: Self-host by deploying preview channels description: How to set up self-hosting by deploying using the WebView2 preview channels, which are the Insider preview channels of Microsoft Edge (Canary, Dev, and Beta). author: MSEdgeTeam ms.author: msedgedevrel @@ -8,7 +8,7 @@ ms.service: microsoft-edge ms.subservice: webview ms.date: 02/23/2024 --- -# Self-hosting by deploying preview channels +# Self-host by deploying preview channels _Self-hosting_ means deploying a preview version of the WebView2 Runtime with your app. This allows you and your development team to use your app daily with the preview version of the WebView2 Runtime, to find issues that will affect your particular WebView2 app, before the forthcoming changes reach the Stable Evergreen WebView2 Runtime. @@ -63,7 +63,6 @@ The value `1` indicates reversed search order; that is, from least-stable (Edge ##### [API](#tab/api) - By default, the `CoreWebView2EnvironmentOptions.ChannelSearchKind` property is `CoreWebView2ChannelSearchKind.MostStable` (an enum value). Instead, reverse the search order by setting the `CoreWebView2EnvironmentOptions.ChannelSearchKind` property to `CoreWebView2ChannelSearchKind.LeastStable`. diff --git a/microsoft-edge/webview2/how-to/set-preview-channel.md b/microsoft-edge/webview2/how-to/set-preview-channel.md index 76c87ce8f8..f24fad3e21 100644 --- a/microsoft-edge/webview2/how-to/set-preview-channel.md +++ b/microsoft-edge/webview2/how-to/set-preview-channel.md @@ -45,7 +45,7 @@ For a deeper understanding of how SDK versions interact with the WebView2 Runtim We recommend that you test the experimental APIs ahead of time, to ensure your app's forward compatibility, by following these best practices: * [Prerelease testing using preview channels](./prerelease-testing.md) -* [Self-hosting by deploying preview channels](./self-hosting.md) +* [Self-host by deploying preview channels](./self-hosting.md) @@ -164,7 +164,7 @@ Pass the path to the browser executable folder during environment creation, by u * [CoreWebView2CreationProperties Class](/dotnet/api/microsoft.web.webview2.winforms.corewebview2creationproperties) WinRT: -* TBD +* [CoreWebView2Environment.CreateWithOptionsAsync Method](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2environment#createwithoptionsasync) Win32: * [CreateCoreWebView2EnvironmentWithOptions](/microsoft-edge/webview2/reference/win32/webview2-idl?#createcorewebview2environmentwithoptions) diff --git a/microsoft-edge/webview2/samples/webview2_sample_uwp.md b/microsoft-edge/webview2/samples/webview2_sample_uwp.md index 4829b2d3cd..e78f8cd576 100644 --- a/microsoft-edge/webview2/samples/webview2_sample_uwp.md +++ b/microsoft-edge/webview2/samples/webview2_sample_uwp.md @@ -117,7 +117,7 @@ Update the project's NuGet packages: 1. Select the **Include prerelease** check box. - A pre-release version of the **Microsoft.UI.Xaml** package is listed, indicating the WinUI 2 SDK. The **Microsoft.UI.Xaml** package includes the WebView2 SDK; **Microsoft.Web.WebView2** is listed in the **Dependencies** section of the **Microsoft.UI.Xaml** package. Updating the **Microsoft.UI.Xaml** package will also cause an update to the compatible WebView2 SDK. + A prerelease version of the **Microsoft.UI.Xaml** package is listed, indicating the WinUI 2 SDK. The **Microsoft.UI.Xaml** package includes the WebView2 SDK; **Microsoft.Web.WebView2** is listed in the **Dependencies** section of the **Microsoft.UI.Xaml** package. Updating the **Microsoft.UI.Xaml** package will also cause an update to the compatible WebView2 SDK. 1. In the **NuGet Package Manager**, click the **Updates** tab. diff --git a/microsoft-edge/webview2/samples/webview2apissample.md b/microsoft-edge/webview2/samples/webview2apissample.md index 71307dc09b..456450918b 100644 --- a/microsoft-edge/webview2/samples/webview2apissample.md +++ b/microsoft-edge/webview2/samples/webview2apissample.md @@ -176,7 +176,7 @@ Next, you'll update the WebView2 SDK and then re-build the project. If you want to quickly see which version of the WebView2 SDK is installed in the repo's copy of the **WebView2APISample** app at GitHub, see [packages.config](https://github.com/MicrosoftEdge/WebView2Samples/blob/main/SampleApps/WebView2APISample/packages.config). -The repo version of this sample has a pre-release version of the WebView2 SDK installed. Below, you'll update it to the latest pre-release version of the WebView2 SDK, or confirm that the latest SDK is installed. Using a pre-release SDK gives you access to the latest functionality. +The repo version of this sample has a prerelease version of the WebView2 SDK installed. Below, you'll update it to the latest prerelease version of the WebView2 SDK, or confirm that the latest SDK is installed. Using a prerelease SDK gives you access to the latest functionality. Examine and possibly update the installed NuGet packages, as follows: From d03fc2d6f85350e9243929e176460326fbe2cf46 Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Wed, 10 Apr 2024 10:36:02 -0700 Subject: [PATCH 38/61] remove how to use env var from tab group --- microsoft-edge/webview2/how-to/set-preview-channel.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/microsoft-edge/webview2/how-to/set-preview-channel.md b/microsoft-edge/webview2/how-to/set-preview-channel.md index f24fad3e21..1aa2654d09 100644 --- a/microsoft-edge/webview2/how-to/set-preview-channel.md +++ b/microsoft-edge/webview2/how-to/set-preview-channel.md @@ -288,6 +288,7 @@ Do either of the following: * Use the built-in policy on Intune. Refer to [Configure Microsoft Edge policy settings in Microsoft Intune](/mem/intune/configuration/administrative-templates-configure-edge) for more information. +--- #### How to use an environment variable @@ -317,9 +318,6 @@ Do either of the following: 1. Click the **OK** buttons to close the dialogs. ---- - - ## See also From ebb0590c0e011b7e4455bacd633032af0600358e Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Wed, 10 Apr 2024 11:15:56 -0700 Subject: [PATCH 39/61] updated wording --- .../webview2/how-to/set-preview-channel.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/microsoft-edge/webview2/how-to/set-preview-channel.md b/microsoft-edge/webview2/how-to/set-preview-channel.md index 1aa2654d09..62405aaba2 100644 --- a/microsoft-edge/webview2/how-to/set-preview-channel.md +++ b/microsoft-edge/webview2/how-to/set-preview-channel.md @@ -13,7 +13,7 @@ ms.date: 03/19/2024 # Switch to a preview channel to test upcoming APIs and features --> -To test new or forthcoming APIs and features, you must switch to a preview channel of Microsoft Edge, instead of using the WebView2 Runtime. The Evergreen WebView2 Runtime is updated often, to add new APIs and functionalities, after APIs have been promoted from Experimental in a Prerelease WebView2 SDK to Stable in the WebView2 Release SDK. Some of the updates in the Evergreen WebView2 Runtime could potentially break your WebView2 app. +To test new or forthcoming APIs and feature you should switch to a Microsoft Edge preview channel rather than using the WebView2 Runtime. The Evergreen WebView2 Runtime is updated frequently to add new APIs and functionalities. These updates occur after APIs have been promoted from `Experimental` in a Prerelease WebView2 SDK to `Stable` in the WebView2 Release SDK. Some of the updates in the Evergreen WebView2 Runtime could potentially break your WebView2 app. We recommend that you test the Experimental APIs ahead of time, before they are promoted to Stable in the WebView2 Release SDK, by switching to a preview channel of Microsoft Edge (which includes WebView2), to ensure your app's forward compatibility. @@ -24,19 +24,19 @@ See also: #### Use a preview channel of WebView2 to test your app against the most recent experimental WebView2 APIs -The Evergreen WebView2 Runtime lacks the most recent experimental WebView2 APIs. To run your WebView2 code with these experimental APIs, your app must use WebView2 in a Microsoft Edge preview channel (Edge Beta, Edge Dev, or Edge Canary). Multiple approaches are supported to achieve this. +The Evergreen WebView2 Runtime does not include the most recent experimental WebView2 APIs. To utilize these experimental features in your WebView2 code, your app should use WebView2 within a Microsoft Edge preview channel (Edge Beta, Edge Dev, or Edge Canary). In the rest of the document we will describe how to switch to a preview channel of Microsoft Edge to test experimental APIs in a prerelease package. The Canary channel is recommended, because it offers the latest experimental APIs. - -#### Interplay between the WebView2 Prerelease SDK and the preview channels of Microsoft Edge +#### Interplay between the WebView2 Prerelease SDK and Microsoft Edge Preview Channels + -* A Prerelease version of the WebView2 SDK contains the method signatures for experimental APIs, which allow you to write code using the experimental WebView2 APIs in your app. +* **Prerelease SDK:** This version of the WebView2 SDK provides method signatures for experimental APIs, which allow you to write code using the experimental WebView2 APIs in your app. -* The preview channels of Microsoft Edge contain the Microsoft Edge binaries that are needed to run and render your app, including the implementation of the experimental APIs. +* **Microsoft Edge Preview Channels:** These channels (Edge Beta, Edge Dev, or Edge Canary) contain the necessary Microsoft Edge binaries. They allow your app to run and render using the experimental APIs. -For a deeper understanding of how SDK versions interact with the WebView2 Runtime and Microsoft Edge preview channels, see [Understand the different WebView2 SDK versions](../concepts/versioning.md). +For a deeper dive into how SDK versions interact with WebView2 Runtime and Microsoft Edge preview channels, refer to [Understand the different WebView2 SDK versions](../concepts/versioning.md). @@ -67,7 +67,7 @@ There are two ways to make your WebView2 app use a specified preview channel of * [Setting the browser executable folder (for local testing)](#setting-the-browser-executable-folder-for-local-testing). -These approaches are described below. +These approaches are described below: From 95b1956afdaf5f925d77b0002552509e356140e6 Mon Sep 17 00:00:00 2001 From: Michael Hoffman Date: Wed, 10 Apr 2024 15:56:08 -0700 Subject: [PATCH 40/61] Writer/Editor pass on latest commit --- .../webview2/how-to/set-preview-channel.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/microsoft-edge/webview2/how-to/set-preview-channel.md b/microsoft-edge/webview2/how-to/set-preview-channel.md index 62405aaba2..98b2af4759 100644 --- a/microsoft-edge/webview2/how-to/set-preview-channel.md +++ b/microsoft-edge/webview2/how-to/set-preview-channel.md @@ -6,16 +6,16 @@ ms.author: msedgedevrel ms.topic: conceptual ms.service: microsoft-edge ms.subservice: webview -ms.date: 03/19/2024 +ms.date: 04/10/2024 --- # Test upcoming APIs and features -To test new or forthcoming APIs and feature you should switch to a Microsoft Edge preview channel rather than using the WebView2 Runtime. The Evergreen WebView2 Runtime is updated frequently to add new APIs and functionalities. These updates occur after APIs have been promoted from `Experimental` in a Prerelease WebView2 SDK to `Stable` in the WebView2 Release SDK. Some of the updates in the Evergreen WebView2 Runtime could potentially break your WebView2 app. +To test new or forthcoming APIs and features, switch to a Microsoft Edge preview channel rather than using the WebView2 Runtime. The Evergreen WebView2 Runtime is updated frequently to add new APIs and functionalities. These updates occur after APIs have been promoted from `Experimental` in a Prerelease WebView2 SDK to `Stable` in the WebView2 Release SDK. Some of the updates in the Evergreen WebView2 Runtime could potentially break your WebView2 app. -We recommend that you test the Experimental APIs ahead of time, before they are promoted to Stable in the WebView2 Release SDK, by switching to a preview channel of Microsoft Edge (which includes WebView2), to ensure your app's forward compatibility. +We recommend that you test the Experimental APIs ahead of time, before they are promoted to Stable in the WebView2 Release SDK, by switching to a preview channel of Microsoft Edge (which includes WebView2), to ensure that your app is forward-compatible. See also: * [Phases of introducing APIs](../concepts/versioning.md#phases-of-introducing-apis) in _Understand the different WebView2 SDK versions_. @@ -24,19 +24,19 @@ See also: #### Use a preview channel of WebView2 to test your app against the most recent experimental WebView2 APIs -The Evergreen WebView2 Runtime does not include the most recent experimental WebView2 APIs. To utilize these experimental features in your WebView2 code, your app should use WebView2 within a Microsoft Edge preview channel (Edge Beta, Edge Dev, or Edge Canary). In the rest of the document we will describe how to switch to a preview channel of Microsoft Edge to test experimental APIs in a prerelease package. +The Evergreen WebView2 Runtime doesn't include experimental WebView2 APIs. Instead, to use these experimental features in your WebView2 code, have your app use the version of WebView2 that's in a Microsoft Edge preview channel (Edge Beta, Edge Dev, or Edge Canary). This article explains how to switch to a preview channel of Microsoft Edge, to test experimental APIs that are in a WebView2 Prerelease SDK package. The Canary channel is recommended, because it offers the latest experimental APIs. + #### Interplay between the WebView2 Prerelease SDK and Microsoft Edge Preview Channels - * **Prerelease SDK:** This version of the WebView2 SDK provides method signatures for experimental APIs, which allow you to write code using the experimental WebView2 APIs in your app. * **Microsoft Edge Preview Channels:** These channels (Edge Beta, Edge Dev, or Edge Canary) contain the necessary Microsoft Edge binaries. They allow your app to run and render using the experimental APIs. -For a deeper dive into how SDK versions interact with WebView2 Runtime and Microsoft Edge preview channels, refer to [Understand the different WebView2 SDK versions](../concepts/versioning.md). +For more information about how SDK versions interact with the WebView2 Runtime and the Microsoft Edge preview channels, see [Understand the different WebView2 SDK versions](../concepts/versioning.md). @@ -67,7 +67,7 @@ There are two ways to make your WebView2 app use a specified preview channel of * [Setting the browser executable folder (for local testing)](#setting-the-browser-executable-folder-for-local-testing). -These approaches are described below: +These approaches are described below. From 647252eeb7a3121fbd0a11181636bf9a60d29f3e Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Thu, 11 Apr 2024 17:00:36 -0700 Subject: [PATCH 41/61] Improve wording in the set preview channel document --- .../webview2/how-to/set-preview-channel.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/microsoft-edge/webview2/how-to/set-preview-channel.md b/microsoft-edge/webview2/how-to/set-preview-channel.md index 98b2af4759..f12c7fb5b0 100644 --- a/microsoft-edge/webview2/how-to/set-preview-channel.md +++ b/microsoft-edge/webview2/how-to/set-preview-channel.md @@ -13,7 +13,7 @@ ms.date: 04/10/2024 # Switch to a preview channel to test upcoming APIs and features --> -To test new or forthcoming APIs and features, switch to a Microsoft Edge preview channel rather than using the WebView2 Runtime. The Evergreen WebView2 Runtime is updated frequently to add new APIs and functionalities. These updates occur after APIs have been promoted from `Experimental` in a Prerelease WebView2 SDK to `Stable` in the WebView2 Release SDK. Some of the updates in the Evergreen WebView2 Runtime could potentially break your WebView2 app. +To test new or forthcoming APIs and features, switch to a Microsoft Edge preview channel rather than using the stable WebView2 Runtime. The Evergreen WebView2 Runtime is updated frequently to add new APIs and functionalities. These updates can include APIs have been promoted from `Experimental` in a Prerelease WebView2 SDK to `Stable` in the WebView2 Release SDK. Some of the updates in the Evergreen WebView2 Runtime could potentially break your WebView2 app. We recommend that you test the Experimental APIs ahead of time, before they are promoted to Stable in the WebView2 Release SDK, by switching to a preview channel of Microsoft Edge (which includes WebView2), to ensure that your app is forward-compatible. @@ -24,7 +24,7 @@ See also: #### Use a preview channel of WebView2 to test your app against the most recent experimental WebView2 APIs -The Evergreen WebView2 Runtime doesn't include experimental WebView2 APIs. Instead, to use these experimental features in your WebView2 code, have your app use the version of WebView2 that's in a Microsoft Edge preview channel (Edge Beta, Edge Dev, or Edge Canary). This article explains how to switch to a preview channel of Microsoft Edge, to test experimental APIs that are in a WebView2 Prerelease SDK package. +The Evergreen WebView2 Runtime doesn't include experimental WebView2 APIs. Instead, to use these experimental features in your WebView2 code, have your app use the version of WebView2 that is in a Microsoft Edge preview channel (Edge Beta, Edge Dev, or Edge Canary). This article explains how to switch to a preview channel of Microsoft Edge, to test experimental APIs that are in a WebView2 Prerelease SDK package. The Canary channel is recommended, because it offers the latest experimental APIs. @@ -42,7 +42,7 @@ For more information about how SDK versions interact with the WebView2 Runtime a #### Forward-compatibility testing by using the preview channel -We recommend that you test the experimental APIs ahead of time, to ensure your app's forward compatibility, by following these best practices: +We recommend that you test upcoming changes using preview channels to ensure your app's forward compatibility, by following these best practices: * [Prerelease testing using preview channels](./prerelease-testing.md) * [Self-host by deploying preview channels](./self-hosting.md) @@ -214,15 +214,14 @@ Do either of the following: #### When does the new runtime get picked up? -If you are using an environment variable, registry key, or group policy, they are only applied to any new processes that are created; they do not apply to processes that are already running. To ensure that all processes use the environment variable, registry key, or group policy, you would need to restart the processes. - +If you are using an environment variable, registry key, or group policy, they are only applied to any new WebView2 Runtime browser processes that are created; they do not apply to WebView2 Runtime browser processes that are already running. For example, if you already have a WebView2 with a specific user data folder (and therefore a corresponding browser process) and change ChannelSearchKind before attempting to create a new WebView2 using that same user data folder, it will use the existing WebView2 Runtime browser process, and not search for a different runtime. To ensure that all processes use the environment variable, registry key, or group policy, you would need to restart the app, recreate the WebView2 controls, or create a new WebView2 that has a different user data folder than any other currently running WebView2 controls. #### When using `ChannelSearchKind`, how do I make sure the right channel is picked up when I have multiple preview browser channels? -In addition to reversing the channel search order, you can modify the set of release channels, to provide further control over channel selection. The loader will search for channels on the device according to the channel search kind, but it will only consider channels that are in the specified set of release channels. +In addition to reversing the channel search order, you can modify the set of release channels to include in the search, to provide further control over channel selection. The loader will search for channels on the device in the order specified by the channel search kind, but it will only consider channels that are in the specified set of release channels. -This option is useful if you would like to target a particular channel, instead of simply choosing the least stable channel. By default, release channels includes all channels: Stable (0), Beta (1), Dev (2), and Canary (3). +This option is useful if you would like to target a particular channel, instead of simply choosing the most or least stable channel. By default, the release channels includes all channels: Stable (0), Beta (1), Dev (2), and Canary (3). Example: @@ -272,7 +271,7 @@ Replace `WebView2APISample.exe` with your own app executable name or the applica Name: `WEBVIEW2_RELEASE_CHANNELS` Value: `` -The environment variable is applied to all apps that use WebView2 on the machine, unlike the registry key, which can be set per app. +The environment variable if set globally is applied to all apps that use WebView2 on the machine, unlike the registry key, which can be set per app. ##### [Group policy](#tab/group-policy) From e556e3715283e23101c090b90ab685e0301207de Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Thu, 11 Apr 2024 17:01:04 -0700 Subject: [PATCH 42/61] Address issues in the selfhosting - prerelease testing document --- .../webview2/how-to/prerelease-testing.md | 41 ++++++----- .../webview2/how-to/self-hosting.md | 68 +++++++++---------- 2 files changed, 51 insertions(+), 58 deletions(-) diff --git a/microsoft-edge/webview2/how-to/prerelease-testing.md b/microsoft-edge/webview2/how-to/prerelease-testing.md index 722193cbf7..6df5fb3267 100644 --- a/microsoft-edge/webview2/how-to/prerelease-testing.md +++ b/microsoft-edge/webview2/how-to/prerelease-testing.md @@ -10,14 +10,7 @@ ms.date: 03/01/2024 --- # Prerelease testing using preview channels -_Prerelease testing_ means testing your WebView2 app by using the preview channels of Microsoft Edge to find issues that will affect your particular WebView2 app, before any changes ship in the Stable Evergreen Runtime. Prerelease testing helps your app catch bugs in prerelease channels of WebView2, before the WebView2 changes ship in a stable release and degrade the app experience for end users. In prerelease testing, you validate your app against early builds of WebView2, to ensure that your app will work with the upcoming changes. - -To validate your app against early builds of WebView2, do automated testing with the preview channels of Microsoft Edge. A preview channel contains a WebView2 preview runtime. - -The preview (or "insider") channels of Microsoft Edge consist of: -* Edge Canary - releases daily. -* Edge Dev - releases weekly. -* Edge Beta - releases every 4 weeks. +_Prerelease testing_ means testing your WebView2 app by using the preview channels of Microsoft Edge to find issues that will affect your particular WebView2 app, before any changes ship in the Stable Evergreen WebView2 Runtime. This helps catch any bugs before they degrade app experience for end users. See also: * [Overview of the Microsoft Edge channels](/deployedge/microsoft-edge-channels) @@ -30,7 +23,7 @@ See also: Evergreen WebView2 is based on the evergreen Chromium platform, which receives monthly major updates. Regressions in WebView2 apps tend to be application-specific, rather than affecting all WebView2 apps. WebView2 is tested in a variety of general scenarios, but it's possible that some of the specific scenarios of your app are not covered. -To catch app-specific regressions before WebView2 changes ship in Edge Stable, test your WebView2 app against the prerelease runtime that's shipped with the prerelease channels of Microsoft Edge (Edge Canary, Edge Dev, or Edge Beta). +To catch app-specific regressions before WebView2 changes ship in Edge Stable, test your WebView2 app against the preview runtime that shipped with the preview channels of Microsoft Edge (Edge Canary, Edge Dev, or Edge Beta). @@ -42,19 +35,19 @@ Do the following steps: 1. Set the preview channel for your app. See [Set the preview channel by using ChannelSearchKind](#set-the-preview-channel-by-using-channelsearchkind), below. -1. Deploy the non-stable channels. See [How to deploy non-stable channels](#how-to-deploy-non-stable-channels), below. +1. Deploy the preview channels. See [How to deploy preview channels](#how-to-deploy-preview-channels), below. -1. Conduct automated testing on your app running against the non-stable channels. See [How to do automated testing](#how-to-do-automated-testing), below. +1. Conduct automated testing on your app running against the preview channels. See [How to do automated testing](#how-to-do-automated-testing), below. 1. Compare the results with the baseline. See [The baseline release of WebView2 for testing](#the-baseline-release-of-webview2-for-testing), below. -Upon finding issues, you can report them via the [WebView2 feedback repo](https://github.com/MicrosoftEdge/WebView2Feedback). +Upon finding issues, you can report them via the [WebView2 feedback repo](https://github.com/MicrosoftEdge/WebView2Feedback). Under the `Runtime Channel` section, do indicate that you found the issue on a preview channel so that we can prioritize the fix before the bug ships to stable. ## Set the preview channel by using ChannelSearchKind -The channel search kind controls the channel search order. By default, the WebView2 loader searches for binaries from most-stable to least-stable (Canary), using the first binary that's found: +The ChannelSearchKind setting controls the channel search order. By default, the WebView2 loader searches for runtimes from most-stable to least-stable (Canary), using the first runtime that's found: ``` WebView2 Runtime (Stable) -> Edge Beta -> Edge Dev -> Edge Canary @@ -66,17 +59,19 @@ To do prerelease testing, reverse the channel search order, so that the loader l Edge Canary -> Edge Dev -> Edge Beta -> WebView2 Runtime (Stable) ``` -The channel search kind can be set per-app through an API, a registry key, an environment variable, or a group policy. Using the API is the recommended approach. +The ChannelSearchKind setting can be set per-app through an API, a registry key, an environment variable, or a group policy. Using the API is the recommended approach. This must be done before the WebView2 control is initialized. -The value `1` indicates reversed search order; that is, from least-stable (Edge Canary) to most-stable. +For the Registry Key, Environmental variable and Group Policy, the value `1` indicates reversed search order; that is, from least-stable (Edge Canary) to most-stable. The value `0` is the default search order. ##### [API](#tab/api) -Using the API is the recommended approach. +Using the API is the recommended approach for pre-release testing. By default, the `CoreWebView2EnvironmentOptions.ChannelSearchKind` property is `CoreWebView2ChannelSearchKind.MostStable` (an enum value). Instead, reverse the search order by setting the `CoreWebView2EnvironmentOptions.ChannelSearchKind` property to `CoreWebView2ChannelSearchKind.LeastStable`. + + .NET: * [CoreWebView2EnvironmentOptions.ChannelSearchKind Property](/dotnet/api/microsoft.web.webview2.core.corewebview2environmentoptions.channelsearchkind) * [CoreWebView2ChannelSearchKind Enum](/dotnet/api/microsoft.web.webview2.core.corewebview2channelsearchkind) @@ -97,7 +92,7 @@ Win32: REG ADD \Software\Policies\Microsoft\Edge\WebView2\ChannelSearchKind /v WebView2APISample.exe /t REG_DWORD /d 1 ``` -Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. +Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. Value `1` for the reversed-search order, and `0` for the default search order. ##### [Environment variable](#tab/environment-variable) @@ -105,7 +100,7 @@ Replace `WebView2APISample.exe` with your own app executable name or the applica Name: `WEBVIEW2_CHANNEL_SEARCH_KIND` Value: `1` -Note that the environment variable will be applied to all apps that use WebView2 on the machine, unlike the registry key, which can be set per app. +Note that you are not able to specify the target app when using the environment variable. Therefore, when set as a global environment, it will affect all apps that use WebView2 on the machine. Value `1` for the reversed-search order, and `0` for the default search order. ##### [Group policy](#tab/group-policy) @@ -114,6 +109,8 @@ Set the `ChannelSearchKind` policy. * Name: `` * Value: `1` +Value `1` for the reversed-search order, and `0` for the default search order. + Do either of the following: * Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). For more information, see [Configure Microsoft Edge policy settings on Windows devices](/deployedge/configure-microsoft-edge). @@ -126,9 +123,9 @@ Do either of the following: -## How to deploy non-stable channels +## How to deploy preview channels -Preview channels of Microsoft Edge (which include WebView2) are also called _insider channels_. These are the non-stable channels of Microsoft Edge. +Preview channels of Microsoft Edge (which include WebView2) are also called _insider channels_. Once installed, they will stay up-to-date and install the latest versions available for that channel. For example, this means the Canary channel will update itself almost daily. To deploy a preview channel of Microsoft Edge, do either of the following: * Manually install preview channels on test machines. @@ -140,7 +137,7 @@ These options are explained below. #### Option 1: Manually install preview channels on test machines -Insider channels can be manually installed through the following links: +Preview channels can be manually installed through the following links: | Channel | Link | | --- | --- | @@ -148,7 +145,7 @@ Insider channels can be manually installed through the following links: | Dev | [Download](https://go.microsoft.com/fwlink/?linkid=2093291) | | Beta | [Download](https://go.microsoft.com/fwlink/?linkid=2093376) | -This only needs to be done once per machine. Prerelease channels are evergreen, so will automatically get updated when newer versions are available. +This only needs to be done once per machine. preview channels are evergreen, so will automatically get updated when newer versions are available. diff --git a/microsoft-edge/webview2/how-to/self-hosting.md b/microsoft-edge/webview2/how-to/self-hosting.md index 060456dbc0..e83a2b01b7 100644 --- a/microsoft-edge/webview2/how-to/self-hosting.md +++ b/microsoft-edge/webview2/how-to/self-hosting.md @@ -10,13 +10,13 @@ ms.date: 02/23/2024 --- # Self-host by deploying preview channels -_Self-hosting_ means deploying a preview version of the WebView2 Runtime with your app. This allows you and your development team to use your app daily with the preview version of the WebView2 Runtime, to find issues that will affect your particular WebView2 app, before the forthcoming changes reach the Stable Evergreen WebView2 Runtime. +_Self-hosting_ means deploying a preview WebView2 Runtime with your app. This allows you and your development team to use your app daily with the preview version of the WebView2 Runtime, to find issues that will affect your particular WebView2 app, before the forthcoming changes reach the Stable Evergreen WebView2 Runtime. -The self-hosting approach provides real-world usage of your app with the latest prerelease version of the WebView2 Runtime, to catch any issues that may arise. You should self-host your app in tandem with doing prerelease testing on your app, to provide a structured approach to testing your app with the latest version of the WebView2 Runtime. +The self-hosting approach provides real-world usage of your app with the latest preview WebView2 Runtime to catch any issues that may arise. You should self-host your app in tandem with doing prerelease testing on your app, to provide a structured approach to testing your app with the latest version of the WebView2 Runtime. | Approach | Technique | Purpose/value | |---|---|---| -| Prerelease testing | Automated testing on a preview version of WebView2 Runtime with your app. | Test your app with the preview version of in a structured way, to find issues before WebView2 changes reach the Stable Evergreen Runtime. | +| Prerelease testing | Automated testing on a preview version of WebView2 Runtime with your app. | Test your app with a preview version of the WebView2 Runtime to find issues before WebView2 upcoming changes reach the Stable Evergreen Runtime. | | Self-hosting | Deploy a preview version of WebView2 Runtime with your app. | Use your app daily with the preview version of WebView2 Runtime, to find issues before WebView2 changes reach the Stable Evergreen Runtime. | See also: @@ -28,7 +28,7 @@ See also: We recommend that you start self-hosting by using the Dev channel of the WebView2 Runtime, which is in the Dev Channel of the Microsoft Edge browser. The Dev channel of the WebView2 Runtime is updated weekly, and it allows you to catch issues early, while having sufficient stability for daily use. -The Canary channel is also suitable, but do note that it might be less stable. The Beta channel is available as well, but it is not recommended as you might not be able to catch issues early enough for your app. +The Canary channel is also suitable, but do note that it might be less stable for daily use. The Beta channel is available as well, which allows you to test against the version of the runtime that is about to ship to stable, but you might not be able to catch issues early enough for your application. To self-host a preview channel of WebView2: @@ -59,26 +59,9 @@ Edge Canary -> Edge Dev -> Edge Beta -> WebView2 Runtime (Stable) The channel search kind can be set per app through an API, a registry key, an environment variable, or a group policy. -The value `1` indicates reversed search order; that is, from least-stable (Edge Canary) to most-stable. - - -##### [API](#tab/api) - -By default, the `CoreWebView2EnvironmentOptions.ChannelSearchKind` property is `CoreWebView2ChannelSearchKind.MostStable` (an enum value). Instead, reverse the search order by setting the `CoreWebView2EnvironmentOptions.ChannelSearchKind` property to `CoreWebView2ChannelSearchKind.LeastStable`. - -.NET: -* [CoreWebView2EnvironmentOptions.ChannelSearchKind Property](/dotnet/api/microsoft.web.webview2.core.corewebview2environmentoptions.channelsearchkind) -* [CoreWebView2ChannelSearchKind Enum](/dotnet/api/microsoft.web.webview2.core.corewebview2channelsearchkind) - -WinRT: -* [CoreWebView2EnvironmentOptions.ChannelSearchKind Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2environmentoptions#channelsearchkind) -* [CoreWebView2ChannelSearchKind Enum](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2channelsearchkind) - -Win32: -* [ICoreWebView2ExperimentalEnvironmentOptions::get_ChannelSearchKind](/microsoft-edge/webview2/reference/win32/icorewebview2experimentalenvironmentoptions#get_channelsearchkind) -* [ICoreWebView2ExperimentalEnvironmentOptions::put_ChannelSearchKind](/microsoft-edge/webview2/reference/win32/icorewebview2experimentalenvironmentoptions#put_channelsearchkind) -* [COREWEBVIEW2_CHANNEL_SEARCH_KIND enum](/microsoft-edge/webview2/reference/win32/webview2experimental-idl#corewebview2_channel_search_kind) +For the Registry Key, Environmental variable and Group Policy, the value `1` indicates reversed search order; that is, from least-stable (Edge Canary) to most-stable. The value `0` is the default search order. +We recommend using either the Registry Key or Group Policy for self-hosting. ##### [Registry key](#tab/registry-key) @@ -86,7 +69,7 @@ Win32: REG ADD \Software\Policies\Microsoft\Edge\WebView2\ChannelSearchKind /v WebView2APISample.exe /t REG_DWORD /d 1 ``` -Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. +Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. Value `1` for the reversed-search order, and `0` for the default search order. ##### [Environment variable](#tab/environment-variable) @@ -94,8 +77,7 @@ Replace `WebView2APISample.exe` with your own app executable name or the applica * Name: `WEBVIEW2_CHANNEL_SEARCH_KIND` * Value: `1` -Note that the environment variable will be applied to all apps that use WebView2 on the machine, unlike the registry key, which can be set per app. - +Note that you are not able to specify the target app when using the environment variable. Therefore, when set as a global environment, it will affect all apps that use WebView2 on the machine. Value `1` for the reversed-search order, and `0` for the default search order. ##### [Group policy](#tab/group-policy) @@ -104,12 +86,33 @@ Set the `ChannelSearchKind` policy. * Name: `` * Value: `1` +Value `1` for the reversed-search order, and `0` for the default search order. + Do either of the following: * Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Refer to [Configure Microsoft Edge policy settings on Windows devices](/deployedge/configure-microsoft-edge) for more information. * Use the built-in policy on Intune. Refer to [Configure Microsoft Edge policy settings in Microsoft Intune](/mem/intune/configuration/administrative-templates-configure-edge) for more information. +##### [API](#tab/api) + +By default, the `CoreWebView2EnvironmentOptions.ChannelSearchKind` property is `CoreWebView2ChannelSearchKind.MostStable` (an enum value). Instead, reverse the search order by setting the `CoreWebView2EnvironmentOptions.ChannelSearchKind` property to `CoreWebView2ChannelSearchKind.LeastStable`. + + + +.NET: +* [CoreWebView2EnvironmentOptions.ChannelSearchKind Property](/dotnet/api/microsoft.web.webview2.core.corewebview2environmentoptions.channelsearchkind) +* [CoreWebView2ChannelSearchKind Enum](/dotnet/api/microsoft.web.webview2.core.corewebview2channelsearchkind) + +WinRT: +* [CoreWebView2EnvironmentOptions.ChannelSearchKind Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2environmentoptions#channelsearchkind) +* [CoreWebView2ChannelSearchKind Enum](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2channelsearchkind) + +Win32: +* [ICoreWebView2ExperimentalEnvironmentOptions::get_ChannelSearchKind](/microsoft-edge/webview2/reference/win32/icorewebview2experimentalenvironmentoptions#get_channelsearchkind) +* [ICoreWebView2ExperimentalEnvironmentOptions::put_ChannelSearchKind](/microsoft-edge/webview2/reference/win32/icorewebview2experimentalenvironmentoptions#put_channelsearchkind) +* [COREWEBVIEW2_CHANNEL_SEARCH_KIND enum](/microsoft-edge/webview2/reference/win32/webview2experimental-idl#corewebview2_channel_search_kind) + --- @@ -166,23 +169,16 @@ To diagnose or troubleshoot potential prerelease WebView2 Runtime issues that ar 1. Find your application's process, then find the Edge WebView2 child process -1. Right click on the Edge WebView2 process, and then `Open file location`. The folder will be version number of the runtime. +1. Right click on the Edge WebView2 process, and then `Open file location`. The folder will be the version number of the runtime. #### Switch to the Stable WebView2 Runtime channel to see if the issue reproduces If the issue doesn't reproduce on the Stable channel of the WebView2 Runtime, it's likely that the issue is with the preview channel of WebView2, or how your app interacts with the preview channel of WebView2. -You can easily switch to the stable channel (Stable WebView2 Runtime) by using environmental variables, because revised environment variables override the registry settings (which are set by group policies). This allows you to easily switch from a preview channel to the stable channel, to see if the issue reproduces. If you are already using environmental variables, you simply update the values. Note that changing the environment variables changes the WebView2 channel for all apps that use WebView2 on the machine. - -For `ChannelSearchKind` options, set the following: -* Name: `WEBVIEW2_CHANNEL_SEARCH_KIND` -* Value: `0` - -For `BrowserExecutableFolder` options, set the following: -* Name: `WEBVIEW2_BROWSER_EXECUTABLE_FOLDER` -* Value: `` +You can easily switch to the stable channel (Evergreen WebView2 Runtime) by [using environmental variables](tabs=environment-variable#set-the-preview-channel-by-using-channelsearchkind), because revised environment variables override the registry settings (which are what's set by group policies). This allows you to easily switch from a preview channel to the stable channel, to see if the issue reproduces. If you are already using environmental variables, you simply update the values. Note that if you are setting the environment variable globally, it will change the WebView2 channel for all apps that use WebView2 on the machine. +If you are using the API, then we recommend building UI in your app that allows your users to change between using stable or preview runtimes. #### Collect diagnostics data From d07a824f459b89d05aa000b0753c059ccf1ff55b Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Fri, 12 Apr 2024 14:58:27 -0700 Subject: [PATCH 43/61] Deduplicate information across articles --- .../webview2/how-to/prerelease-testing.md | 142 +----------------- .../webview2/how-to/self-hosting.md | 127 +--------------- .../webview2/how-to/set-preview-channel.md | 74 +++++++-- 3 files changed, 78 insertions(+), 265 deletions(-) diff --git a/microsoft-edge/webview2/how-to/prerelease-testing.md b/microsoft-edge/webview2/how-to/prerelease-testing.md index 6df5fb3267..33f91b6954 100644 --- a/microsoft-edge/webview2/how-to/prerelease-testing.md +++ b/microsoft-edge/webview2/how-to/prerelease-testing.md @@ -33,147 +33,21 @@ Start with automated testing against the Microsoft Edge **Canary** channel, whic Do the following steps: -1. Set the preview channel for your app. See [Set the preview channel by using ChannelSearchKind](#set-the-preview-channel-by-using-channelsearchkind), below. +1. **Set the preview channel for your app**: +You can [set the preview channel by using ChannelSearchKind](./set-preview-channel.md#switching-the-channel-search-order-recommended), making it such that your WebView2 app uses the least-stable channel (Canary / Dev). -1. Deploy the preview channels. See [How to deploy preview channels](#how-to-deploy-preview-channels), below. +1. **Install or deploy the preview channel**: +Install them manually from [Microsoft Edge Insider Channels](https://www.microsoft.com/edge/download/insider). To deploy them to devices see [how to deploy preview channels](./set-preview-channel.md#how-to-deploy-preview-channels). -1. Conduct automated testing on your app running against the preview channels. See [How to do automated testing](#how-to-do-automated-testing), below. +1. **Conduct automated testing on your app running against the preview channels**: +You can do that using WebDriver, following instructions here [Automate and test WebView2 apps with Microsoft Edge WebDriver](./webdriver.md). -1. Compare the results with the baseline. See [The baseline release of WebView2 for testing](#the-baseline-release-of-webview2-for-testing), below. +1. **Compare the results with the baseline**: +The baseline for testing should be the latest stable release of WebView2, which can be either the Evergreen WebView2 runtime, or the latest fixed runtime. You can download them from [Microsoft Edge WebView2 page](https://developer.microsoft.com/microsoft-edge/webview2/). Upon finding issues, you can report them via the [WebView2 feedback repo](https://github.com/MicrosoftEdge/WebView2Feedback). Under the `Runtime Channel` section, do indicate that you found the issue on a preview channel so that we can prioritize the fix before the bug ships to stable. - -## Set the preview channel by using ChannelSearchKind - -The ChannelSearchKind setting controls the channel search order. By default, the WebView2 loader searches for runtimes from most-stable to least-stable (Canary), using the first runtime that's found: - -``` -WebView2 Runtime (Stable) -> Edge Beta -> Edge Dev -> Edge Canary -``` - -To do prerelease testing, reverse the channel search order, so that the loader looks for binaries in order from least-stable (Canary) to most-stable: - -``` -Edge Canary -> Edge Dev -> Edge Beta -> WebView2 Runtime (Stable) -``` - -The ChannelSearchKind setting can be set per-app through an API, a registry key, an environment variable, or a group policy. Using the API is the recommended approach. This must be done before the WebView2 control is initialized. - -For the Registry Key, Environmental variable and Group Policy, the value `1` indicates reversed search order; that is, from least-stable (Edge Canary) to most-stable. The value `0` is the default search order. - - -##### [API](#tab/api) - -Using the API is the recommended approach for pre-release testing. - -By default, the `CoreWebView2EnvironmentOptions.ChannelSearchKind` property is `CoreWebView2ChannelSearchKind.MostStable` (an enum value). Instead, reverse the search order by setting the `CoreWebView2EnvironmentOptions.ChannelSearchKind` property to `CoreWebView2ChannelSearchKind.LeastStable`. - - - -.NET: -* [CoreWebView2EnvironmentOptions.ChannelSearchKind Property](/dotnet/api/microsoft.web.webview2.core.corewebview2environmentoptions.channelsearchkind) -* [CoreWebView2ChannelSearchKind Enum](/dotnet/api/microsoft.web.webview2.core.corewebview2channelsearchkind) - -WinRT: -* [CoreWebView2EnvironmentOptions.ChannelSearchKind Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2environmentoptions#channelsearchkind) -* [CoreWebView2ChannelSearchKind Enum](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2channelsearchkind) - -Win32: -* [ICoreWebView2ExperimentalEnvironmentOptions::get_ChannelSearchKind](/microsoft-edge/webview2/reference/win32/icorewebview2experimentalenvironmentoptions#get_channelsearchkind) -* [ICoreWebView2ExperimentalEnvironmentOptions::put_ChannelSearchKind](/microsoft-edge/webview2/reference/win32/icorewebview2experimentalenvironmentoptions#put_channelsearchkind) -* [COREWEBVIEW2_CHANNEL_SEARCH_KIND enum](/microsoft-edge/webview2/reference/win32/webview2experimental-idl#corewebview2_channel_search_kind) - - -##### [Registry key](#tab/registry-key) - -```reg -REG ADD \Software\Policies\Microsoft\Edge\WebView2\ChannelSearchKind /v WebView2APISample.exe /t REG_DWORD /d 1 -``` - -Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. Value `1` for the reversed-search order, and `0` for the default search order. - - -##### [Environment variable](#tab/environment-variable) - -Name: `WEBVIEW2_CHANNEL_SEARCH_KIND` -Value: `1` - -Note that you are not able to specify the target app when using the environment variable. Therefore, when set as a global environment, it will affect all apps that use WebView2 on the machine. Value `1` for the reversed-search order, and `0` for the default search order. - -##### [Group policy](#tab/group-policy) - -Set the `ChannelSearchKind` policy. - -* Name: `` -* Value: `1` - -Value `1` for the reversed-search order, and `0` for the default search order. - -Do either of the following: - -* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). For more information, see [Configure Microsoft Edge policy settings on Windows devices](/deployedge/configure-microsoft-edge). - -* Use the built-in policy on Intune. See the following articles. The steps for WebView2 are the same as for Microsoft Edge, except use the category "Microsoft Edge WebView2" instead of "Microsoft Edge". - * [Configure Microsoft Edge policy settings in Microsoft Intune](/mem/intune/configuration/administrative-templates-configure-edge) in the Microsoft Intune documentation. - * [Configure Microsoft Edge policy settings with Microsoft Intune](/deployedge/configure-edge-with-intune) in the Microsoft Edge Enterprise documentation. - ---- - - - -## How to deploy preview channels - -Preview channels of Microsoft Edge (which include WebView2) are also called _insider channels_. Once installed, they will stay up-to-date and install the latest versions available for that channel. For example, this means the Canary channel will update itself almost daily. - -To deploy a preview channel of Microsoft Edge, do either of the following: -* Manually install preview channels on test machines. -* Programmatically deploy preview channels via API. - -These options are explained below. - - - -#### Option 1: Manually install preview channels on test machines - -Preview channels can be manually installed through the following links: - -| Channel | Link | -| --- | --- | -| Canary | [Download](https://go.microsoft.com/fwlink/?linkid=2084649&Channel=Canary) | -| Dev | [Download](https://go.microsoft.com/fwlink/?linkid=2093291) | -| Beta | [Download](https://go.microsoft.com/fwlink/?linkid=2093376) | - -This only needs to be done once per machine. preview channels are evergreen, so will automatically get updated when newer versions are available. - - - -#### Option 2: Programmatically deploy preview channels via API endpoints - -In your app's code, periodically poll the following API endpoints to get and deploy the latest version of each preview channel of Microsoft Edge: - -| Channel | Link | -| --- | --- | -| Canary | [https://edgeupdates.microsoft.com/api/products/canary](https://edgeupdates.microsoft.com/api/products/canary)
[MSI Link](https://go.microsoft.com/fwlink/?linkid=2084649&Channel=Canary) | -| Dev | [https://edgeupdates.microsoft.com/api/products/dev](https://edgeupdates.microsoft.com/api/products/dev) | -| Beta | [https://edgeupdates.microsoft.com/api/products/beta](https://edgeupdates.microsoft.com/api/products/beta) | - -The Edge Dev and Edge Beta channels contain MSI Links. The Edge Canary channel has a separate MSI link. - - - -## How to do automated testing - -See [Automate and test WebView2 apps with Microsoft Edge WebDriver](./webdriver.md). - - - -## The baseline release of WebView2 for testing - -The baseline for testing should be the latest stable release of WebView2. You can use either the Evergreen WebView2 Runtime or a fixed version of the Runtime. You can download the runtimes from the [Microsoft Edge WebView2](https://developer.microsoft.com/microsoft-edge/webview2/) page at developer.microsoft.com. - - ## See also diff --git a/microsoft-edge/webview2/how-to/self-hosting.md b/microsoft-edge/webview2/how-to/self-hosting.md index e83a2b01b7..445b37ef9b 100644 --- a/microsoft-edge/webview2/how-to/self-hosting.md +++ b/microsoft-edge/webview2/how-to/self-hosting.md @@ -33,133 +33,22 @@ The Canary channel is also suitable, but do note that it might be less stable fo To self-host a preview channel of WebView2: -1. Set the preview channel for your app. See [Set the preview channel by using ChannelSearchKind](#set-the-preview-channel-by-using-channelsearchkind), below. +1. **Set the preview channel for your app**: +You can [set the preview channel by using ChannelSearchKind](./set-preview-channel.md#switching-the-channel-search-order-recommended), making it such that your WebView2 app uses the least-stable channel (Canary / Dev). We recommend using either the Registry Key or Group Policy for self-hosting. -1. Install the preview channel on your team's machines. See [Install preview channels on your team's machines](#install-preview-channels-on-your-teams-machines), below. +1. **Install the preview channel on your team's machines**: +If it's just to a handful of devices, you could download and install them manually from [Microsoft Edge Insider Channels](https://www.microsoft.com/edge/download/insider). To deploy them to multiple devices, see [how to deploy preview channels](./set-preview-channel.md#how-to-deploy-preview-channels). -1. Use your app daily with the preview channel of WebView2, and diagnose potential issues with the WebView2 Runtime. See [Diagnose potential issues with the WebView2 Runtime](#diagnose-potential-issues-with-the-webview2-runtime), below. +1. **Use your app daily with the preview channel of WebView2, and diagnose potential issues with the WebView2 Runtime:** +See [Diagnose potential issues with the WebView2 Runtime](#diagnose-potential-issues-with-the-webview2-runtime), below. -Upon finding issues, you can report them to the [Microsoft Edge WebView2 feedback repository](https://github.com/MicrosoftEdge/WebView2Feedback). - - - -## Set the preview channel by using ChannelSearchKind - -The channel search kind controls the default channel search order. By default, the WebView2 loader searches for binaries from most-stable to least-stable (Canary), using the first binary that's found: - -``` -WebView2 Runtime (Stable) -> Edge Beta -> Edge Dev -> Edge Canary -``` - -To selfhost, you would reverse the channel search order, so that the loader looks for binaries in order from least-stable (Canary) to most-stable: - -``` -Edge Canary -> Edge Dev -> Edge Beta -> WebView2 Runtime (Stable) -``` - -The channel search kind can be set per app through an API, a registry key, an environment variable, or a group policy. - -For the Registry Key, Environmental variable and Group Policy, the value `1` indicates reversed search order; that is, from least-stable (Edge Canary) to most-stable. The value `0` is the default search order. - -We recommend using either the Registry Key or Group Policy for self-hosting. - -##### [Registry key](#tab/registry-key) - -```reg -REG ADD \Software\Policies\Microsoft\Edge\WebView2\ChannelSearchKind /v WebView2APISample.exe /t REG_DWORD /d 1 -``` - -Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. Value `1` for the reversed-search order, and `0` for the default search order. - - -##### [Environment variable](#tab/environment-variable) - -* Name: `WEBVIEW2_CHANNEL_SEARCH_KIND` -* Value: `1` - -Note that you are not able to specify the target app when using the environment variable. Therefore, when set as a global environment, it will affect all apps that use WebView2 on the machine. Value `1` for the reversed-search order, and `0` for the default search order. - -##### [Group policy](#tab/group-policy) - -Set the `ChannelSearchKind` policy. - -* Name: `` -* Value: `1` - -Value `1` for the reversed-search order, and `0` for the default search order. - -Do either of the following: - -* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Refer to [Configure Microsoft Edge policy settings on Windows devices](/deployedge/configure-microsoft-edge) for more information. - -* Use the built-in policy on Intune. Refer to [Configure Microsoft Edge policy settings in Microsoft Intune](/mem/intune/configuration/administrative-templates-configure-edge) for more information. - -##### [API](#tab/api) - -By default, the `CoreWebView2EnvironmentOptions.ChannelSearchKind` property is `CoreWebView2ChannelSearchKind.MostStable` (an enum value). Instead, reverse the search order by setting the `CoreWebView2EnvironmentOptions.ChannelSearchKind` property to `CoreWebView2ChannelSearchKind.LeastStable`. - - - -.NET: -* [CoreWebView2EnvironmentOptions.ChannelSearchKind Property](/dotnet/api/microsoft.web.webview2.core.corewebview2environmentoptions.channelsearchkind) -* [CoreWebView2ChannelSearchKind Enum](/dotnet/api/microsoft.web.webview2.core.corewebview2channelsearchkind) - -WinRT: -* [CoreWebView2EnvironmentOptions.ChannelSearchKind Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2environmentoptions#channelsearchkind) -* [CoreWebView2ChannelSearchKind Enum](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2channelsearchkind) - -Win32: -* [ICoreWebView2ExperimentalEnvironmentOptions::get_ChannelSearchKind](/microsoft-edge/webview2/reference/win32/icorewebview2experimentalenvironmentoptions#get_channelsearchkind) -* [ICoreWebView2ExperimentalEnvironmentOptions::put_ChannelSearchKind](/microsoft-edge/webview2/reference/win32/icorewebview2experimentalenvironmentoptions#put_channelsearchkind) -* [COREWEBVIEW2_CHANNEL_SEARCH_KIND enum](/microsoft-edge/webview2/reference/win32/webview2experimental-idl#corewebview2_channel_search_kind) - ---- - - - -## Install preview channels on your team's machines - -Preview channels of Microsoft Edge (which include WebView2) are also called _insider channels_. These are the non-stable channels of Microsoft Edge. - -To install the preview channels of Microsoft Edge on your team's machines, do either of the following: -* Manually install preview channels on machines. -* Programmatically deploy preview channels via API. - -These options are explained below. - - - -#### Option 1: Manually install preview channels on machines - -Insider channels can be manually installed through the following links: - -| Channel | Link | -| --- | --- | -| Canary | [Download](https://go.microsoft.com/fwlink/?linkid=2084649&Channel=Canary&language=en) | -| Dev | [Download](https://go.microsoft.com/fwlink/?linkid=2093291) | -| Beta | [Download](https://go.microsoft.com/fwlink/?linkid=2093376) | - -This only needs to be done once per machine. Prerelease channels are evergreen, so they will automatically get updated when newer versions are available. - - - -#### Option 2: Programmatically deploy preview channels via API endpoints - -In your app's code, periodically poll the following API endpoints to get and deploy the latest version of each preview channel of Microsoft Edge: - -| Channel | Link | -| --- | --- | -| Canary | [https://edgeupdates.microsoft.com/api/products/canary](https://edgeupdates.microsoft.com/api/products/canary)
[MSI Link](https://go.microsoft.com/fwlink/?linkid=2084649&Channel=Canary&language=en)| -| Dev | [https://edgeupdates.microsoft.com/api/products/dev](https://edgeupdates.microsoft.com/api/products/dev) | -| Beta | [https://edgeupdates.microsoft.com/api/products/beta](https://edgeupdates.microsoft.com/api/products/beta) | - -The Edge Dev and Edge Beta channels contain MSI Links. The Edge Canary channel has a separate MSI link. +Upon finding issues, you can report them to the [Microsoft Edge WebView2 feedback repository](https://github.com/MicrosoftEdge/WebView2Feedback). Under the `Runtime Channel` section, do indicate that you found the issue on a preview channel so that we can prioritize the fix before the bug ships to stable. ## Diagnose potential issues with the WebView2 Runtime -To diagnose or troubleshoot potential prerelease WebView2 Runtime issues that are revealed by your app, use the following techniques. +To diagnose or troubleshoot potential prerelease WebView2 Runtime issues that are revealed by your app, you can do the following diff --git a/microsoft-edge/webview2/how-to/set-preview-channel.md b/microsoft-edge/webview2/how-to/set-preview-channel.md index f12c7fb5b0..102ea23979 100644 --- a/microsoft-edge/webview2/how-to/set-preview-channel.md +++ b/microsoft-edge/webview2/how-to/set-preview-channel.md @@ -53,8 +53,9 @@ We recommend that you test upcoming changes using preview channels to ensure you To use experimental APIs, download a prerelease version of the WebView2 SDK from [Microsoft.Web.WebView2 package](https://www.nuget.org/packages/Microsoft.Web.WebView2). -To download a Microsoft Edge preview channel, see [Microsoft Edge Insider Channels](https://www.microsoft.com/edge/download/insider). +Preview channels of Microsoft Edge, which include preview WebView2 runtime, are also called _insider channels_. Once installed, they will stay up-to-date and install the latest versions available for that channel. For example, this means the Canary channel will update itself almost daily. To download a Microsoft Edge preview channel, see [Microsoft Edge Insider Channels](https://www.microsoft.com/edge/download/insider). +For deployment to multiple machine, please see [how to deploy preview channels](#how-to-deploy-preview-channels) ## Approaches to making your app use a specific browser channel @@ -75,20 +76,26 @@ These approaches are described below. This section applies to using an API, registry override, environment variable, or group policy. -If a specific browser executable folder isn't specified, then the WebView2 will attempt to load a runtime from one of the known default locations. +If a specific browser executable folder isn't specified, then the WebView2 will attempt to load a runtime from one of the known default locations. By default, the WebView2 loader searches for runtimes from most-stable to least-stable (Canary), using the first runtime that's found. -The default channel-search order is: -1. The WebView2 Runtime. -1. Edge Beta; the Beta channel of Microsoft Edge. -1. Edge Dev; the Dev channel of Microsoft Edge. -1. Edge Canary; the Canary channel of Microsoft Edge. +``` +WebView2 Runtime (Stable) -> Edge Beta -> Edge Dev -> Edge Canary +``` -You can reverse the default search order by setting the `ChannelSearchKind` API to `LeastStable`, or by setting the `ChannelSearchKind` policy, registry key, or environment variable to `1`. +You can reverse the default search order by setting the `ChannelSearchKind` API to `LeastStable`, or by setting the `ChannelSearchKind` policy, registry key, or environment variable to `1`. Reversing the search order makes it such that WebView2 loader searches from least-stable (Canary) to most-stable: + +``` +Edge Canary -> Edge Dev -> Edge Beta -> WebView2 Runtime (Stable) +``` + +This must be done before the WebView2 control is initialized. ##### [API](#tab/api) By default, the `CoreWebView2EnvironmentOptions.ChannelSearchKind` property is `CoreWebView2ChannelSearchKind.MostStable` (an enum value). Instead, reverse the search order by setting the `CoreWebView2EnvironmentOptions.ChannelSearchKind` property to `CoreWebView2ChannelSearchKind.LeastStable`. + + .NET: * [CoreWebView2EnvironmentOptions.ChannelSearchKind Property](/dotnet/api/microsoft.web.webview2.core.corewebview2environmentoptions.channelsearchkind) * [CoreWebView2ChannelSearchKind Enum](/dotnet/api/microsoft.web.webview2.core.corewebview2channelsearchkind) @@ -113,7 +120,9 @@ Win32: REG ADD \Software\Policies\Microsoft\Edge\WebView2\ChannelSearchKind /v WebView2APISample.exe /t REG_DWORD /d 1 ``` -Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. Using a wildcard (*) as the value name will apply the override to _all_ WebView2 apps on the machine and can result in unexpected behavior. +Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. Using a wildcard `*` will apply the override to _all_ WebView2 apps on the machine and can result in unexpected behavior. + +Value `1` for the reversed-search order, and `0` for the default search order. ##### [Environment variable](#tab/environment-variable) @@ -121,7 +130,7 @@ Replace `WebView2APISample.exe` with your own app executable name or the applica Name: `WEBVIEW2_CHANNEL_SEARCH_KIND` Value: `1` -Note that the environment variable will be applied to all apps that use WebView2 on the machine, unlike the registry key, which can be set per app. +Note that you are not able to specify the target app when using the environment variable. Therefore, when set as a global environment, it will affect all apps that use WebView2 on the machine. Value `1` for the reversed-search order, and `0` for the default search order. ##### [Group policy](#tab/group-policy) @@ -131,11 +140,15 @@ Set the `ChannelSearchKind` policy. * Name: `` * Value: `1` +Value `1` for the reversed-search order, and `0` for the default search order. + Do either of the following: -* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Click any of the three **Download Windows Policy** links. Refer to [Configure Microsoft Edge policy settings on Windows devices](/deployedge/configure-microsoft-edge) for more information. +* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). For more information, see [Configure Microsoft Edge policy settings on Windows devices](/deployedge/configure-microsoft-edge). -* Use the built-in policy on Intune. Refer to [Configure Microsoft Edge policy settings in Microsoft Intune](/mem/intune/configuration/administrative-templates-configure-edge) for more information. +* Use the built-in policy on Intune. See the following articles. The steps for WebView2 are the same as for Microsoft Edge, except use the category "Microsoft Edge WebView2" instead of "Microsoft Edge". + * [Configure Microsoft Edge policy settings in Microsoft Intune](/mem/intune/configuration/administrative-templates-configure-edge) in the Microsoft Intune documentation. + * [Configure Microsoft Edge policy settings with Microsoft Intune](/deployedge/configure-edge-with-intune) in the Microsoft Edge Enterprise documentation. --- @@ -316,6 +329,43 @@ Do either of the following: 1. Click the **OK** buttons to close the dialogs. + +#### How to deploy preview channels + +To deploy the preview channels of Microsoft Edge to multiple machines, do either of the following: +* Manually install preview channels on machines. +* Programmatically deploy preview channels via API. + +These options are explained below. + + + +#### Option 1: Manually install preview channels on machines + +Insider channels can be manually installed (be it by hand or through a deployed script) through the following enterpise links: + +| Channel | Link | +| --- | --- | +| Canary | [Download](https://go.microsoft.com/fwlink/?linkid=2084649&Channel=Canary&language=en) | +| Dev | [Download](https://go.microsoft.com/fwlink/?linkid=2093291) | +| Beta | [Download](https://go.microsoft.com/fwlink/?linkid=2093376) | + +This only needs to be done once per machine. Prerelease channels are evergreen, so they will automatically get updated when newer versions are available. + + + +#### Option 2: Programmatically deploy preview channels via API endpoints + +In your app's code, periodically poll the following API endpoints to get and deploy the latest version of each preview channel of Microsoft Edge: + +| Channel | Link | +| --- | --- | +| Canary | [https://edgeupdates.microsoft.com/api/products/canary](https://edgeupdates.microsoft.com/api/products/canary)
[MSI Link](https://go.microsoft.com/fwlink/?linkid=2084649&Channel=Canary&language=en)| +| Dev | [https://edgeupdates.microsoft.com/api/products/dev](https://edgeupdates.microsoft.com/api/products/dev) | +| Beta | [https://edgeupdates.microsoft.com/api/products/beta](https://edgeupdates.microsoft.com/api/products/beta) | + +The Edge Dev and Edge Beta channels contain MSI Links. The Edge Canary channel has a separate MSI link. + ## See also From 8c8d1bdd1452e89320df2f285880922b79efd55e Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Fri, 12 Apr 2024 15:16:54 -0700 Subject: [PATCH 44/61] fix wording issues --- microsoft-edge/webview2/how-to/self-hosting.md | 14 +++++++------- .../webview2/how-to/set-preview-channel.md | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/microsoft-edge/webview2/how-to/self-hosting.md b/microsoft-edge/webview2/how-to/self-hosting.md index 445b37ef9b..3f6b7a0d4e 100644 --- a/microsoft-edge/webview2/how-to/self-hosting.md +++ b/microsoft-edge/webview2/how-to/self-hosting.md @@ -10,7 +10,7 @@ ms.date: 02/23/2024 --- # Self-host by deploying preview channels -_Self-hosting_ means deploying a preview WebView2 Runtime with your app. This allows you and your development team to use your app daily with the preview version of the WebView2 Runtime, to find issues that will affect your particular WebView2 app, before the forthcoming changes reach the Stable Evergreen WebView2 Runtime. +_Self-hosting_ means deploying a preview WebView2 Runtime with your app. This allows you and your development team to use your app daily with the preview version of the WebView2 Runtime, to find issues that will affect your particular WebView2 app, before the forthcoming changes reach the Evergreen WebView2 Runtime (Stable). The self-hosting approach provides real-world usage of your app with the latest preview WebView2 Runtime to catch any issues that may arise. You should self-host your app in tandem with doing prerelease testing on your app, to provide a structured approach to testing your app with the latest version of the WebView2 Runtime. @@ -26,18 +26,18 @@ See also: ## How to self-host a preview channel of WebView2 -We recommend that you start self-hosting by using the Dev channel of the WebView2 Runtime, which is in the Dev Channel of the Microsoft Edge browser. The Dev channel of the WebView2 Runtime is updated weekly, and it allows you to catch issues early, while having sufficient stability for daily use. +We recommend that you self-host using the preview WebView2 Runtime in the Dev channel of the Edge browser. The Dev channel is updated weekly, so it allows you to catch issues early while having sufficient stability for daily use. -The Canary channel is also suitable, but do note that it might be less stable for daily use. The Beta channel is available as well, which allows you to test against the version of the runtime that is about to ship to stable, but you might not be able to catch issues early enough for your application. +The Canary channel is also suitable, but it might be less stable for daily use. The Beta channel allows you to test against the version of the runtime that is about to ship to stable, but you might not be able to catch issues early enough for your application. -To self-host a preview channel of WebView2: +Do the following steps: 1. **Set the preview channel for your app**: -You can [set the preview channel by using ChannelSearchKind](./set-preview-channel.md#switching-the-channel-search-order-recommended), making it such that your WebView2 app uses the least-stable channel (Canary / Dev). We recommend using either the Registry Key or Group Policy for self-hosting. +You can [set the preview channel by using ChannelSearchKind](./set-preview-channel.md#switching-the-channel-search-order-recommended), making it such that your WebView2 app uses the least-stable channel on the device. We recommend using either the Registry Key or Group Policy for self-hosting. 1. **Install the preview channel on your team's machines**: -If it's just to a handful of devices, you could download and install them manually from [Microsoft Edge Insider Channels](https://www.microsoft.com/edge/download/insider). To deploy them to multiple devices, see [how to deploy preview channels](./set-preview-channel.md#how-to-deploy-preview-channels). +To install on handful of devices, you can download and install them manually from [Microsoft Edge Insider Channels](https://www.microsoft.com/edge/download/insider). To deploy them to multiple devices, see [how to deploy preview channels](./set-preview-channel.md#how-to-deploy-preview-channels). 1. **Use your app daily with the preview channel of WebView2, and diagnose potential issues with the WebView2 Runtime:** See [Diagnose potential issues with the WebView2 Runtime](#diagnose-potential-issues-with-the-webview2-runtime), below. @@ -48,7 +48,7 @@ Upon finding issues, you can report them to the [Microsoft Edge WebView2 feedbac ## Diagnose potential issues with the WebView2 Runtime -To diagnose or troubleshoot potential prerelease WebView2 Runtime issues that are revealed by your app, you can do the following +To diagnose or troubleshoot potential preview WebView2 Runtime issues that are revealed by your app, you can do the following diff --git a/microsoft-edge/webview2/how-to/set-preview-channel.md b/microsoft-edge/webview2/how-to/set-preview-channel.md index 102ea23979..1d55d8d035 100644 --- a/microsoft-edge/webview2/how-to/set-preview-channel.md +++ b/microsoft-edge/webview2/how-to/set-preview-channel.md @@ -340,7 +340,7 @@ These options are explained below. -#### Option 1: Manually install preview channels on machines +##### Option 1: Manually install preview channels on machines Insider channels can be manually installed (be it by hand or through a deployed script) through the following enterpise links: @@ -354,7 +354,7 @@ This only needs to be done once per machine. Prerelease channels are evergreen, -#### Option 2: Programmatically deploy preview channels via API endpoints +##### Option 2: Programmatically deploy preview channels via API endpoints In your app's code, periodically poll the following API endpoints to get and deploy the latest version of each preview channel of Microsoft Edge: From ed618bcbcb05b146cc9a71b38f3ceb6c7d3bdd05 Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Fri, 12 Apr 2024 15:20:47 -0700 Subject: [PATCH 45/61] fix broken link --- microsoft-edge/webview2/how-to/self-hosting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microsoft-edge/webview2/how-to/self-hosting.md b/microsoft-edge/webview2/how-to/self-hosting.md index 3f6b7a0d4e..e6b47c4bcf 100644 --- a/microsoft-edge/webview2/how-to/self-hosting.md +++ b/microsoft-edge/webview2/how-to/self-hosting.md @@ -65,7 +65,7 @@ To diagnose or troubleshoot potential preview WebView2 Runtime issues that are r If the issue doesn't reproduce on the Stable channel of the WebView2 Runtime, it's likely that the issue is with the preview channel of WebView2, or how your app interacts with the preview channel of WebView2. -You can easily switch to the stable channel (Evergreen WebView2 Runtime) by [using environmental variables](tabs=environment-variable#set-the-preview-channel-by-using-channelsearchkind), because revised environment variables override the registry settings (which are what's set by group policies). This allows you to easily switch from a preview channel to the stable channel, to see if the issue reproduces. If you are already using environmental variables, you simply update the values. Note that if you are setting the environment variable globally, it will change the WebView2 channel for all apps that use WebView2 on the machine. +You can easily switch to the stable channel (Evergreen WebView2 Runtime) by [using environmental variables](./set-preview-channel.md?tabs=environment-variable#switching-the-channel-search-order-recommended), because revised environment variables override the registry settings (which are what's set by group policies). This allows you to easily switch from a preview channel to the stable channel, to see if the issue reproduces. If you are already using environmental variables, you simply update the values. Note that if you are setting the environment variable globally, it will change the WebView2 channel for all apps that use WebView2 on the machine. If you are using the API, then we recommend building UI in your app that allows your users to change between using stable or preview runtimes. From f3104f071bc8845702dec4ae8ec609edbe8e62c2 Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Thu, 18 Apr 2024 12:03:27 -0700 Subject: [PATCH 46/61] Updated links from experimental to stable api links --- .../webview2/how-to/set-preview-channel.md | 29 +++++++++++++------ 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/microsoft-edge/webview2/how-to/set-preview-channel.md b/microsoft-edge/webview2/how-to/set-preview-channel.md index 1d55d8d035..d95d3228c2 100644 --- a/microsoft-edge/webview2/how-to/set-preview-channel.md +++ b/microsoft-edge/webview2/how-to/set-preview-channel.md @@ -105,9 +105,9 @@ WinRT: * [CoreWebView2ChannelSearchKind Enum](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2channelsearchkind) Win32: -* [ICoreWebView2ExperimentalEnvironmentOptions::get_ChannelSearchKind](/microsoft-edge/webview2/reference/win32/icorewebview2experimentalenvironmentoptions#get_channelsearchkind) -* [ICoreWebView2ExperimentalEnvironmentOptions::put_ChannelSearchKind](/microsoft-edge/webview2/reference/win32/icorewebview2experimentalenvironmentoptions#put_channelsearchkind) -* [COREWEBVIEW2_CHANNEL_SEARCH_KIND enum](/microsoft-edge/webview2/reference/win32/webview2experimental-idl#corewebview2_channel_search_kind) +* [ICoreWebView2EnvironmentOptions7::get_ChannelSearchKind](/microsoft-edge/webview2/reference/win32/icorewebview2environmentoptions7#get_channelsearchkind) +* [ICoreWebView2EnvironmentOptions7::put_ChannelSearchKind](/microsoft-edge/webview2/reference/win32/icorewebview2environmentoptions7#put_channelsearchkind) +* [COREWEBVIEW2_CHANNEL_SEARCH_KIND enum](/microsoft-edge/webview2/reference/win32//webview2-idl#corewebview2_channel_search_kind) ##### [Registry key](#tab/registry-key) @@ -261,9 +261,9 @@ WinRT: * [CoreWebView2ChannelSearchKind Enum](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2releasechannels) Win32: -* [ICoreWebView2ExperimentalEnvironmentOptions::get_ReleaseChannels](/microsoft-edge/webview2/reference/win32/icorewebview2experimentalenvironmentoptions#get_releasechannels) -* [ICoreWebView2ExperimentalEnvironmentOptions::put_ReleaseChannels](/microsoft-edge/webview2/reference/win32/icorewebview2experimentalenvironmentoptions#put_releasechannels) -* [COREWEBVIEW2_RELEASE_CHANNELS enum](/microsoft-edge/webview2/reference/win32/webview2experimental-idl#corewebview2_release_channels) +* [ICoreWebView2EnvironmentOptions7::get_ReleaseChannels](/microsoft-edge/webview2/reference/win32/icorewebview2environmentoptions7#get_releasechannels) +* [ICoreWebView2EnvironmentOptions7::put_ReleaseChannels](/microsoft-edge/webview2/reference/win32/icorewebview2environmentoptions7#put_releasechannels) +* [COREWEBVIEW2_RELEASE_CHANNELS enum](/microsoft-edge/webview2/reference/win32/webview2-idl#corewebview2_release_channels) ##### [Registry key](#tab/registry-key) @@ -305,6 +305,15 @@ Do either of the following: #### How to use an environment variable +##### Setting environmental variables using API + +You are able to set your environment variables using the respective `SetEnvrionmentVariable` APIs available in each framework. + +- Win32: [SetEnvironmentVariable](https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setenvironmentvariable) +- .NET: [Environment.SetEnvironmentVariable](https://learn.microsoft.com/en-us/dotnet/api/system.environment.setenvironmentvariable) +- WinRT: [EnvironmentManager.SetEnvironmentVariable](https://learn.microsoft.com/en-us/windows/windows-app-sdk/api/winrt/microsoft.windows.system.environmentmanager.setenvironmentvariable) + +##### Setting environmental variables globally 1. In the Windows search bar, enter "environment", and then select **Edit the system environment variables**: ![Using the Windows search bar to find where to edit environment variables](./set-preview-channel-images/search-bar-edit-sys-env-vars.png) @@ -342,7 +351,7 @@ These options are explained below. ##### Option 1: Manually install preview channels on machines -Insider channels can be manually installed (be it by hand or through a deployed script) through the following enterpise links: +Insider channels can be manually installed (be it by hand or through a deployed custom script) through the following enterpise links: | Channel | Link | | --- | --- | @@ -352,11 +361,13 @@ Insider channels can be manually installed (be it by hand or through a deployed This only needs to be done once per machine. Prerelease channels are evergreen, so they will automatically get updated when newer versions are available. - ##### Option 2: Programmatically deploy preview channels via API endpoints -In your app's code, periodically poll the following API endpoints to get and deploy the latest version of each preview channel of Microsoft Edge: +In your app's code, you can write your own custom logic to deploy the latest version of the preview channel of Microsoft Edge by doing the following: +1. Call the following API endpoints +2. Fetch the latest package to the device +3. Install the package | Channel | Link | | --- | --- | From 0d0d8547d7f9e2491845f02ff247398517bd6862 Mon Sep 17 00:00:00 2001 From: Michael Hoffman Date: Thu, 18 Apr 2024 16:32:47 -0700 Subject: [PATCH 47/61] Writer/Editor pass on prerelease-testing.md --- .../webview2/how-to/prerelease-testing.md | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/microsoft-edge/webview2/how-to/prerelease-testing.md b/microsoft-edge/webview2/how-to/prerelease-testing.md index 33f91b6954..9fa41574d0 100644 --- a/microsoft-edge/webview2/how-to/prerelease-testing.md +++ b/microsoft-edge/webview2/how-to/prerelease-testing.md @@ -6,15 +6,15 @@ ms.author: msedgedevrel ms.topic: conceptual ms.service: microsoft-edge ms.subservice: webview -ms.date: 03/01/2024 +ms.date: 04/18/2024 --- # Prerelease testing using preview channels -_Prerelease testing_ means testing your WebView2 app by using the preview channels of Microsoft Edge to find issues that will affect your particular WebView2 app, before any changes ship in the Stable Evergreen WebView2 Runtime. This helps catch any bugs before they degrade app experience for end users. +_Prerelease testing_ means testing your WebView2 app by using the preview channels of Microsoft Edge to find issues that will affect your particular WebView2 app, before any changes ship in the Stable Evergreen WebView2 Runtime. This helps catch any bugs before they degrade the app experience for end users. -See also: +See also: * [Overview of the Microsoft Edge channels](/deployedge/microsoft-edge-channels) -* [Become a Microsoft Edge Insider](https://www.microsoft.com/edge/download/insider) - download Edge Canary, Edge Dev, or Edge Beta +* [Become a Microsoft Edge Insider](https://www.microsoft.com/edge/download/insider) - download Edge Canary, Edge Dev, or Edge Beta. * [Self-host by deploying preview channels](./self-hosting.md) @@ -31,21 +31,22 @@ To catch app-specific regressions before WebView2 changes ship in Edge Stable, t Start with automated testing against the Microsoft Edge **Canary** channel, which ships daily. This enables you to catch issues as early as possible. The Microsoft Edge **Dev** channel ships weekly, and is also a good option. -Do the following steps: +To do automated testing: -1. **Set the preview channel for your app**: -You can [set the preview channel by using ChannelSearchKind](./set-preview-channel.md#switching-the-channel-search-order-recommended), making it such that your WebView2 app uses the least-stable channel (Canary / Dev). +1. **Set the preview channel for your app**: +You can set the preview channel by using `ChannelSearchKind`, so that your WebView2 app uses the least-stable channel (Canary, then Dev). To do this, see [Switching the channel search order (recommended)](./set-preview-channel.md#switching-the-channel-search-order-recommended) in _Test upcoming APIs and features_. -1. **Install or deploy the preview channel**: -Install them manually from [Microsoft Edge Insider Channels](https://www.microsoft.com/edge/download/insider). To deploy them to devices see [how to deploy preview channels](./set-preview-channel.md#how-to-deploy-preview-channels). +1. **Install or deploy the preview channel**: + * If you choose to install preview channels manually, install them from [Microsoft Edge Insider Channels](https://www.microsoft.com/edge/download/insider). + * If you instead choose to deploy preview channels to devices, see [How to deploy preview channels](./set-preview-channel.md#how-to-deploy-preview-channels) in _Test upcoming APIs and features_. -1. **Conduct automated testing on your app running against the preview channels**: -You can do that using WebDriver, following instructions here [Automate and test WebView2 apps with Microsoft Edge WebDriver](./webdriver.md). +1. **Conduct automated testing on your app running against the preview channels**: +You can do this automated testing by using WebDriver. See [Automate and test WebView2 apps with Microsoft Edge WebDriver](./webdriver.md). -1. **Compare the results with the baseline**: -The baseline for testing should be the latest stable release of WebView2, which can be either the Evergreen WebView2 runtime, or the latest fixed runtime. You can download them from [Microsoft Edge WebView2 page](https://developer.microsoft.com/microsoft-edge/webview2/). +1. **Compare the results with the baseline**: +The baseline for testing should be the latest stable release of WebView2, which can be either the Evergreen WebView2 runtime, or the latest fixed runtime. You can download the runtime from the [Microsoft Edge WebView2](https://developer.microsoft.com/microsoft-edge/webview2/) page. -Upon finding issues, you can report them via the [WebView2 feedback repo](https://github.com/MicrosoftEdge/WebView2Feedback). Under the `Runtime Channel` section, do indicate that you found the issue on a preview channel so that we can prioritize the fix before the bug ships to stable. +Upon finding issues, you can report them via the [WebView2 feedback repo](https://github.com/MicrosoftEdge/WebView2Feedback). Under the `Runtime Channel` section, be sure to indicate that you found the issue on a preview channel, so that the fix can be prioritized before the bug ships in the Stable release. From df41132b2b2b795d43c5eb37261431d928b6946a Mon Sep 17 00:00:00 2001 From: Michael Hoffman Date: Thu, 18 Apr 2024 17:20:19 -0700 Subject: [PATCH 48/61] Writer/Editor pass on the 3 articles --- .../webview2/how-to/prerelease-testing.md | 16 +-- .../webview2/how-to/self-hosting.md | 40 +++--- .../webview2/how-to/set-preview-channel.md | 118 +++++++++++------- 3 files changed, 102 insertions(+), 72 deletions(-) diff --git a/microsoft-edge/webview2/how-to/prerelease-testing.md b/microsoft-edge/webview2/how-to/prerelease-testing.md index 9fa41574d0..eafda912af 100644 --- a/microsoft-edge/webview2/how-to/prerelease-testing.md +++ b/microsoft-edge/webview2/how-to/prerelease-testing.md @@ -10,7 +10,7 @@ ms.date: 04/18/2024 --- # Prerelease testing using preview channels -_Prerelease testing_ means testing your WebView2 app by using the preview channels of Microsoft Edge to find issues that will affect your particular WebView2 app, before any changes ship in the Stable Evergreen WebView2 Runtime. This helps catch any bugs before they degrade the app experience for end users. +_Prerelease testing_ means testing your WebView2 app by using the preview channels of Microsoft Edge to find issues that will affect your particular WebView2 app, before any changes ship in the Stable Evergreen WebView2 Runtime. This helps catch any bugs before they degrade the app experience for end users. See also: * [Overview of the Microsoft Edge channels](/deployedge/microsoft-edge-channels) @@ -29,24 +29,24 @@ To catch app-specific regressions before WebView2 changes ship in Edge Stable, t ## Start by doing automated testing against Edge Canary -Start with automated testing against the Microsoft Edge **Canary** channel, which ships daily. This enables you to catch issues as early as possible. The Microsoft Edge **Dev** channel ships weekly, and is also a good option. +Start with automated testing against the Microsoft Edge **Canary** channel, which ships daily. This enables you to catch issues as early as possible. The Microsoft Edge **Dev** channel ships weekly, and is also a good option. To do automated testing: -1. **Set the preview channel for your app**: +1. **Set the preview channel for your app**: You can set the preview channel by using `ChannelSearchKind`, so that your WebView2 app uses the least-stable channel (Canary, then Dev). To do this, see [Switching the channel search order (recommended)](./set-preview-channel.md#switching-the-channel-search-order-recommended) in _Test upcoming APIs and features_. -1. **Install or deploy the preview channel**: +1. **Install or deploy the preview channel**: * If you choose to install preview channels manually, install them from [Microsoft Edge Insider Channels](https://www.microsoft.com/edge/download/insider). * If you instead choose to deploy preview channels to devices, see [How to deploy preview channels](./set-preview-channel.md#how-to-deploy-preview-channels) in _Test upcoming APIs and features_. -1. **Conduct automated testing on your app running against the preview channels**: +1. **Conduct automated testing on your app running against the preview channels**: You can do this automated testing by using WebDriver. See [Automate and test WebView2 apps with Microsoft Edge WebDriver](./webdriver.md). -1. **Compare the results with the baseline**: -The baseline for testing should be the latest stable release of WebView2, which can be either the Evergreen WebView2 runtime, or the latest fixed runtime. You can download the runtime from the [Microsoft Edge WebView2](https://developer.microsoft.com/microsoft-edge/webview2/) page. +1. **Compare the results with the baseline**: +The baseline for testing should be the latest stable release of WebView2, which can be either the Evergreen WebView2 runtime, or the latest fixed-version Runtime. You can download the Runtime from the [Microsoft Edge WebView2](https://developer.microsoft.com/microsoft-edge/webview2/) page. -Upon finding issues, you can report them via the [WebView2 feedback repo](https://github.com/MicrosoftEdge/WebView2Feedback). Under the `Runtime Channel` section, be sure to indicate that you found the issue on a preview channel, so that the fix can be prioritized before the bug ships in the Stable release. +Upon finding issues, you can report them via the [Microsoft Edge / WebView2Feedback repo](https://github.com/MicrosoftEdge/WebView2Feedback). Under the `Runtime Channel` section, be sure to indicate that you found the issue on a preview channel, so that the fix can be prioritized before the bug ships in the Stable release. diff --git a/microsoft-edge/webview2/how-to/self-hosting.md b/microsoft-edge/webview2/how-to/self-hosting.md index e6b47c4bcf..d1dd1a5840 100644 --- a/microsoft-edge/webview2/how-to/self-hosting.md +++ b/microsoft-edge/webview2/how-to/self-hosting.md @@ -6,7 +6,7 @@ ms.author: msedgedevrel ms.topic: conceptual ms.service: microsoft-edge ms.subservice: webview -ms.date: 02/23/2024 +ms.date: 04/18/2024 --- # Self-host by deploying preview channels @@ -26,55 +26,59 @@ See also: ## How to self-host a preview channel of WebView2 -We recommend that you self-host using the preview WebView2 Runtime in the Dev channel of the Edge browser. The Dev channel is updated weekly, so it allows you to catch issues early while having sufficient stability for daily use. +We recommend that you self-host using the preview WebView2 Runtime in the Dev channel of the Edge browser. The Dev channel is updated weekly, so it allows you to catch issues early while having sufficient stability for daily use. -The Canary channel is also suitable, but it might be less stable for daily use. The Beta channel allows you to test against the version of the runtime that is about to ship to stable, but you might not be able to catch issues early enough for your application. +The Canary channel is also suitable, but it might be less stable for daily use. The Beta channel allows you to test against the version of the runtime that is about to ship to stable, but you might not be able to catch issues early enough for your application. -Do the following steps: +To self-host a preview channel of WebView2: -1. **Set the preview channel for your app**: +1. **Set the preview channel for your app**: You can [set the preview channel by using ChannelSearchKind](./set-preview-channel.md#switching-the-channel-search-order-recommended), making it such that your WebView2 app uses the least-stable channel on the device. We recommend using either the Registry Key or Group Policy for self-hosting. -1. **Install the preview channel on your team's machines**: +1. **Install the preview channel on your team's machines**: To install on handful of devices, you can download and install them manually from [Microsoft Edge Insider Channels](https://www.microsoft.com/edge/download/insider). To deploy them to multiple devices, see [how to deploy preview channels](./set-preview-channel.md#how-to-deploy-preview-channels). -1. **Use your app daily with the preview channel of WebView2, and diagnose potential issues with the WebView2 Runtime:** +1. **Use your app daily with the preview channel of WebView2, and diagnose potential issues with the WebView2 Runtime:** See [Diagnose potential issues with the WebView2 Runtime](#diagnose-potential-issues-with-the-webview2-runtime), below. -Upon finding issues, you can report them to the [Microsoft Edge WebView2 feedback repository](https://github.com/MicrosoftEdge/WebView2Feedback). Under the `Runtime Channel` section, do indicate that you found the issue on a preview channel so that we can prioritize the fix before the bug ships to stable. +Upon finding issues, you can report them via the [Microsoft Edge / WebView2Feedback repo](https://github.com/MicrosoftEdge/WebView2Feedback). Under the `Runtime Channel` section, be sure to indicate that you found the issue on a preview channel, so that the fix can be prioritized before the bug ships in the Stable release. ## Diagnose potential issues with the WebView2 Runtime -To diagnose or troubleshoot potential preview WebView2 Runtime issues that are revealed by your app, you can do the following +To diagnose or troubleshoot potential preview WebView2 Runtime issues that are revealed by your app, do the following: #### Confirm that your app is running a preview channel of WebView2 -1. Open Task Manager +1. In Windows, open Task Manager. -1. Find your application's process, then find the Edge WebView2 child process +1. Find your application's process, and then find the **Edge WebView2** child process. + +1. Right-click the **Edge WebView2** process, and then select **Open file location**. The folder name is the version number of the Runtime. -1. Right click on the Edge WebView2 process, and then `Open file location`. The folder will be the version number of the runtime. -#### Switch to the Stable WebView2 Runtime channel to see if the issue reproduces +#### Switch to the Stable WebView2 Runtime channel to see if the issue is reproduced + +If the issue isn't reproduced on the Stable channel of the WebView2 Runtime, it's likely that the issue is with the preview channel of WebView2, or how your app interacts with the preview channel of WebView2. + +You can easily switch to the stable channel (Evergreen WebView2 Runtime) by [using environmental variables](./set-preview-channel.md?tabs=environment-variable#switching-the-channel-search-order-recommended), because revised environment variables override the registry settings (which are what's set by group policies). This allows you to easily switch from a preview channel to the stable channel, to see if the issue is reproduced. If you are already using environmental variables, you simply update the values. -If the issue doesn't reproduce on the Stable channel of the WebView2 Runtime, it's likely that the issue is with the preview channel of WebView2, or how your app interacts with the preview channel of WebView2. +If you set the environment variable globally, it changes the WebView2 channel for all apps that use WebView2 on the machine. -You can easily switch to the stable channel (Evergreen WebView2 Runtime) by [using environmental variables](./set-preview-channel.md?tabs=environment-variable#switching-the-channel-search-order-recommended), because revised environment variables override the registry settings (which are what's set by group policies). This allows you to easily switch from a preview channel to the stable channel, to see if the issue reproduces. If you are already using environmental variables, you simply update the values. Note that if you are setting the environment variable globally, it will change the WebView2 channel for all apps that use WebView2 on the machine. +If you are using the API, then we recommend building UI in your app that allows your users to change between using the Stable Runtime or a preview Runtime. -If you are using the API, then we recommend building UI in your app that allows your users to change between using stable or preview runtimes. #### Collect diagnostics data -1. Refer to [Gathering Diagnostics and Logs](https://github.com/MicrosoftEdge/WebView2Feedback/tree/main/diagnostics) on how to gather diagnostic data. Crash dumps and ETW traces are the common ones we require. +1. See [Gathering Diagnostics and Logs](https://github.com/MicrosoftEdge/WebView2Feedback/tree/main/diagnostics). Crash dumps and Event Tracing for Windows (ETW) traces are the common formats that are required. -1. You can then report the issue to the [Microsoft Edge WebView2 feedback repository](https://github.com/MicrosoftEdge/WebView2Feedback), and include the log file. +1. You can then report the issue to the [Microsoft Edge / WebView2Feedback repo](https://github.com/MicrosoftEdge/WebView2Feedback), and include the log file. diff --git a/microsoft-edge/webview2/how-to/set-preview-channel.md b/microsoft-edge/webview2/how-to/set-preview-channel.md index d95d3228c2..44ea439099 100644 --- a/microsoft-edge/webview2/how-to/set-preview-channel.md +++ b/microsoft-edge/webview2/how-to/set-preview-channel.md @@ -6,13 +6,15 @@ ms.author: msedgedevrel ms.topic: conceptual ms.service: microsoft-edge ms.subservice: webview -ms.date: 04/10/2024 +ms.date: 04/18/2024 --- # Test upcoming APIs and features +This article explains how to switch to a preview channel of Microsoft Edge, to test experimental APIs that are in a WebView2 Prerelease SDK package. + To test new or forthcoming APIs and features, switch to a Microsoft Edge preview channel rather than using the stable WebView2 Runtime. The Evergreen WebView2 Runtime is updated frequently to add new APIs and functionalities. These updates can include APIs have been promoted from `Experimental` in a Prerelease WebView2 SDK to `Stable` in the WebView2 Release SDK. Some of the updates in the Evergreen WebView2 Runtime could potentially break your WebView2 app. We recommend that you test the Experimental APIs ahead of time, before they are promoted to Stable in the WebView2 Release SDK, by switching to a preview channel of Microsoft Edge (which includes WebView2), to ensure that your app is forward-compatible. @@ -24,7 +26,7 @@ See also: #### Use a preview channel of WebView2 to test your app against the most recent experimental WebView2 APIs -The Evergreen WebView2 Runtime doesn't include experimental WebView2 APIs. Instead, to use these experimental features in your WebView2 code, have your app use the version of WebView2 that is in a Microsoft Edge preview channel (Edge Beta, Edge Dev, or Edge Canary). This article explains how to switch to a preview channel of Microsoft Edge, to test experimental APIs that are in a WebView2 Prerelease SDK package. +The Evergreen WebView2 Runtime doesn't include experimental WebView2 APIs. Instead, to use these experimental features in your WebView2 code, have your app use the version of WebView2 that is in a Microsoft Edge preview channel (Edge Beta, Edge Dev, or Edge Canary). The Canary channel is recommended, because it offers the latest experimental APIs. @@ -34,7 +36,7 @@ The Canary channel is recommended, because it offers the latest experimental API * **Prerelease SDK:** This version of the WebView2 SDK provides method signatures for experimental APIs, which allow you to write code using the experimental WebView2 APIs in your app. -* **Microsoft Edge Preview Channels:** These channels (Edge Beta, Edge Dev, or Edge Canary) contain the necessary Microsoft Edge binaries. They allow your app to run and render using the experimental APIs. +* **Microsoft Edge Preview Channels:** These channels (Edge Beta, Edge Dev, or Edge Canary) contain the necessary Microsoft Edge binaries. These channels allow your app to run and render using the experimental APIs. For more information about how SDK versions interact with the WebView2 Runtime and the Microsoft Edge preview channels, see [Understand the different WebView2 SDK versions](../concepts/versioning.md). @@ -53,16 +55,17 @@ We recommend that you test upcoming changes using preview channels to ensure you To use experimental APIs, download a prerelease version of the WebView2 SDK from [Microsoft.Web.WebView2 package](https://www.nuget.org/packages/Microsoft.Web.WebView2). -Preview channels of Microsoft Edge, which include preview WebView2 runtime, are also called _insider channels_. Once installed, they will stay up-to-date and install the latest versions available for that channel. For example, this means the Canary channel will update itself almost daily. To download a Microsoft Edge preview channel, see [Microsoft Edge Insider Channels](https://www.microsoft.com/edge/download/insider). +Preview channels of Microsoft Edge, which include preview WebView2 runtime, are also called _insider channels_. After being installed, the preview channels will stay up-to-date and automatically install the latest versions available for that channel. For example, this means the Canary channel will update itself almost daily. To download a Microsoft Edge preview channel, see [Microsoft Edge Insider Channels](https://www.microsoft.com/edge/download/insider). + +To deploy an app to multiple machines, see [how to deploy preview channels](#how-to-deploy-preview-channels). -For deployment to multiple machine, please see [how to deploy preview channels](#how-to-deploy-preview-channels) ## Approaches to making your app use a specific browser channel -When a WebView2 is initialized, it will attempt to find a valid runtime on the machine to use. This can be the WebView2 Runtime, a preview channel of Microsoft Edge, or a specified location containing Fixed Version binaries. For more information about supported runtimes, see [Distribute your app and the WebView2 Runtime](../concepts/distribution.md). +When a WebView2 is initialized, it will attempt to find a valid runtime on the machine to use. This can be the WebView2 Runtime, a preview channel of Microsoft Edge, or a specified location that contains Fixed Version binaries. For more information about supported runtimes, see [Distribute your app and the WebView2 Runtime](../concepts/distribution.md). -There are two ways to make your WebView2 app use a specified preview channel of Microsoft Edge: +There are two ways to make your WebView2 app use a specific preview channel of Microsoft Edge: * [Switching the channel search order (recommended)](#switching-the-channel-search-order-recommended). @@ -76,13 +79,13 @@ These approaches are described below. This section applies to using an API, registry override, environment variable, or group policy. -If a specific browser executable folder isn't specified, then the WebView2 will attempt to load a runtime from one of the known default locations. By default, the WebView2 loader searches for runtimes from most-stable to least-stable (Canary), using the first runtime that's found. +If a specific browser executable folder isn't specified, then the WebView2 will attempt to load a runtime from one of the known default locations. By default, the WebView2 loader searches for runtimes from most-stable to least-stable (Canary), using the first runtime that's found. ``` WebView2 Runtime (Stable) -> Edge Beta -> Edge Dev -> Edge Canary ``` -You can reverse the default search order by setting the `ChannelSearchKind` API to `LeastStable`, or by setting the `ChannelSearchKind` policy, registry key, or environment variable to `1`. Reversing the search order makes it such that WebView2 loader searches from least-stable (Canary) to most-stable: +You can reverse the default search order by setting the `ChannelSearchKind` API to `LeastStable`, or by setting the `ChannelSearchKind` policy, registry key, or environment variable to `1`. Reversing the search order makes the WebView2 loader search from least-stable (Canary) to most-stable: ``` Edge Canary -> Edge Dev -> Edge Beta -> WebView2 Runtime (Stable) @@ -90,12 +93,11 @@ Edge Canary -> Edge Dev -> Edge Beta -> WebView2 Runtime (Stable) This must be done before the WebView2 control is initialized. + ##### [API](#tab/api) By default, the `CoreWebView2EnvironmentOptions.ChannelSearchKind` property is `CoreWebView2ChannelSearchKind.MostStable` (an enum value). Instead, reverse the search order by setting the `CoreWebView2EnvironmentOptions.ChannelSearchKind` property to `CoreWebView2ChannelSearchKind.LeastStable`. - - .NET: * [CoreWebView2EnvironmentOptions.ChannelSearchKind Property](/dotnet/api/microsoft.web.webview2.core.corewebview2environmentoptions.channelsearchkind) * [CoreWebView2ChannelSearchKind Enum](/dotnet/api/microsoft.web.webview2.core.corewebview2channelsearchkind) @@ -108,6 +110,7 @@ Win32: * [ICoreWebView2EnvironmentOptions7::get_ChannelSearchKind](/microsoft-edge/webview2/reference/win32/icorewebview2environmentoptions7#get_channelsearchkind) * [ICoreWebView2EnvironmentOptions7::put_ChannelSearchKind](/microsoft-edge/webview2/reference/win32/icorewebview2environmentoptions7#put_channelsearchkind) * [COREWEBVIEW2_CHANNEL_SEARCH_KIND enum](/microsoft-edge/webview2/reference/win32//webview2-idl#corewebview2_channel_search_kind) + ##### [Registry key](#tab/registry-key) @@ -120,27 +123,29 @@ Win32: REG ADD \Software\Policies\Microsoft\Edge\WebView2\ChannelSearchKind /v WebView2APISample.exe /t REG_DWORD /d 1 ``` -Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. Using a wildcard `*` will apply the override to _all_ WebView2 apps on the machine and can result in unexpected behavior. +Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. Caution: If you instead use a wildcard (`*`), the override is applied to _all_ WebView2 apps on the machine, which can result in unexpected behavior. -Value `1` for the reversed-search order, and `0` for the default search order. +Use the value `1` for the reversed-search order, or `0` for the default search order. ##### [Environment variable](#tab/environment-variable) -Name: `WEBVIEW2_CHANNEL_SEARCH_KIND` +Name: `WEBVIEW2_CHANNEL_SEARCH_KIND` Value: `1` -Note that you are not able to specify the target app when using the environment variable. Therefore, when set as a global environment, it will affect all apps that use WebView2 on the machine. Value `1` for the reversed-search order, and `0` for the default search order. +The target app can't be specified when using the environment variable. Therefore, when set as a global environment, it will affect all apps that use WebView2 on the machine. + +Use the value `1` for the reversed-search order, or `0` for the default search order. ##### [Group policy](#tab/group-policy) Set the `ChannelSearchKind` policy. -* Name: `` +* Name: `` * Value: `1` -Value `1` for the reversed-search order, and `0` for the default search order. +Use the value `1` for the reversed-search order, or `0` for the default search order. Do either of the following: @@ -161,7 +166,7 @@ An alternative approach is to use a browser executable folder. In this approach * A preview channel of Microsoft Edge. * A folder containing fixed version binaries that you have deployed to the machine yourself. -If you set the browser executable folder to a specific preview channel of Microsoft Edge, you will need to update the location when that preview channel updates to a newer version. This is because the location includes the version number as part of its path. Therefore, we recommend using this approach for local testing only. +If you set the browser executable folder to a specific preview channel of Microsoft Edge, you will need to update the location when that preview channel updates to a newer version. This is because the location includes the version number as part of its path. Therefore, we recommend using this approach for local testing only. ##### [API](#tab/api) @@ -193,12 +198,13 @@ Win32: REG ADD \Software\Policies\Microsoft\Edge\WebView2\BrowserExecutableFolder /v WebView2APISample.exe /t REG_SZ /d "C:\Users\myname\AppData\Local\Microsoft\Edge SxS\Application\88.0.680.0" ``` -Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. Replace the sample path with the path to the desired Microsoft Edge preview channel. + * Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. + * Replace the sample path with the path to the desired Microsoft Edge preview channel. ##### [Environment variable](#tab/environment-variable) -Name: `WEBVIEW2_BROWSER_EXECUTABLE_FOLDER` +Name: `WEBVIEW2_BROWSER_EXECUTABLE_FOLDER` Value: `` The environment variable will be applied to all apps that use WebView2 on the machine, unlike the registry key, which can be set per app. @@ -208,7 +214,7 @@ The environment variable will be applied to all apps that use WebView2 on the ma Set the `BrowserExecutableFolder` policy. -Name: `` +Name: `` Value: `` Do either of the following: @@ -227,7 +233,13 @@ Do either of the following: #### When does the new runtime get picked up? -If you are using an environment variable, registry key, or group policy, they are only applied to any new WebView2 Runtime browser processes that are created; they do not apply to WebView2 Runtime browser processes that are already running. For example, if you already have a WebView2 with a specific user data folder (and therefore a corresponding browser process) and change ChannelSearchKind before attempting to create a new WebView2 using that same user data folder, it will use the existing WebView2 Runtime browser process, and not search for a different runtime. To ensure that all processes use the environment variable, registry key, or group policy, you would need to restart the app, recreate the WebView2 controls, or create a new WebView2 that has a different user data folder than any other currently running WebView2 controls. +If you are using an environment variable, registry key, or group policy, they are only applied to any new WebView2 Runtime browser processes that are created; they do not apply to WebView2 Runtime browser processes that are already running. For example, if you already have a WebView2 with a specific user data folder (and therefore a corresponding browser process) and change `ChannelSearchKind` before attempting to create a new WebView2 using that same user data folder, it will use the existing WebView2 Runtime browser process, and not search for a different runtime. + +To ensure that all processes use the environment variable, registry key, or group policy, you need to do any of the following: +* Restart the app. +* Re-create the WebView2 controls. +* Create a new WebView2 that has a different user data folder than any other currently running WebView2 controls. + #### When using `ChannelSearchKind`, how do I make sure the right channel is picked up when I have multiple preview browser channels? @@ -281,39 +293,46 @@ Replace `WebView2APISample.exe` with your own app executable name or the applica ##### [Environment variable](#tab/environment-variable) -Name: `WEBVIEW2_RELEASE_CHANNELS` +Name: `WEBVIEW2_RELEASE_CHANNELS` Value: `` -The environment variable if set globally is applied to all apps that use WebView2 on the machine, unlike the registry key, which can be set per app. +The environment variable, if set globally, is applied to all apps that use WebView2 on the machine. In contrast, the registry key can be set per app. ##### [Group policy](#tab/group-policy) Set the `ReleaseChannel` policy. -* Name: `` +* Name: `` * Value: `` Do either of the following: -* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). Refer to [Configure Microsoft Edge policy settings on Windows devices](/deployedge/configure-microsoft-edge) for more information. +* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). For more information, see [Configure Microsoft Edge policy settings on Windows devices](/deployedge/configure-microsoft-edge). -* Use the built-in policy on Intune. Refer to [Configure Microsoft Edge policy settings in Microsoft Intune](/mem/intune/configuration/administrative-templates-configure-edge) for more information. +* Use the built-in policy on Intune. For more information, see [Configure Microsoft Edge policy settings in Microsoft Intune](/mem/intune/configuration/administrative-templates-configure-edge). --- #### How to use an environment variable -##### Setting environmental variables using API -You are able to set your environment variables using the respective `SetEnvrionmentVariable` APIs available in each framework. + +###### Setting environmental variables using API + +You can set environment variables by using `SetEnvironmentVariable`. + +* .NET: [Environment.SetEnvironmentVariable Method](/dotnet/api/system.environment.setenvironmentvariable) + +* WinRT: [EnvironmentManager.SetEnvironmentVariable Method](/windows/windows-app-sdk/api/winrt/microsoft.windows.system.environmentmanager.setenvironmentvariable) -- Win32: [SetEnvironmentVariable](https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setenvironmentvariable) -- .NET: [Environment.SetEnvironmentVariable](https://learn.microsoft.com/en-us/dotnet/api/system.environment.setenvironmentvariable) -- WinRT: [EnvironmentManager.SetEnvironmentVariable](https://learn.microsoft.com/en-us/windows/windows-app-sdk/api/winrt/microsoft.windows.system.environmentmanager.setenvironmentvariable) +* Win32: [SetEnvironmentVariable function (winbase.h)](/windows/win32/api/winbase/nf-winbase-setenvironmentvariable) + + + +###### Setting environmental variables globally -##### Setting environmental variables globally 1. In the Windows search bar, enter "environment", and then select **Edit the system environment variables**: ![Using the Windows search bar to find where to edit environment variables](./set-preview-channel-images/search-bar-edit-sys-env-vars.png) @@ -332,26 +351,29 @@ You are able to set your environment variables using the respective `SetEnvrionm 1. In the **Variable value** text box, do either of the following: - * If setting the ChannelSearchKind, enter `1` to reverse the search order from the default, to use the preview channels first (Canary, Beta, then Dev), followed by the WebView2 Runtime. Any value other than `1` causes the default search order to be used (WebView2 Runtime, Edge Dev, Edge Beta, and then Edge Canary). + * If setting the `ChannelSearchKind`, enter `1` to reverse the search order from the default, to use the preview channels first (Canary, Beta, then Dev), followed by the WebView2 Runtime. Any value other than `1` causes the default search order to be used (WebView2 Runtime, Edge Dev, Edge Beta, and then Edge Canary). - * If setting the BrowserExecutableFolder, enter the path to your preferred browser channel or fixed-version binaries. + * If setting the `BrowserExecutableFolder`, enter the path to your preferred browser channel or fixed-version binaries. 1. Click the **OK** buttons to close the dialogs. + #### How to deploy preview channels To deploy the preview channels of Microsoft Edge to multiple machines, do either of the following: -* Manually install preview channels on machines. -* Programmatically deploy preview channels via API. + +* Option 1: Manually install preview channels on machines. + +* Option 2: Programmatically deploy preview channels via API endpoints. These options are explained below. - -##### Option 1: Manually install preview channels on machines + +###### Option 1: Manually install preview channels on machines -Insider channels can be manually installed (be it by hand or through a deployed custom script) through the following enterpise links: +Insider channels can be manually installed (either manually or through a deployed custom script) through the following enterprise links: | Channel | Link | | --- | --- | @@ -359,15 +381,19 @@ Insider channels can be manually installed (be it by hand or through a deployed | Dev | [Download](https://go.microsoft.com/fwlink/?linkid=2093291) | | Beta | [Download](https://go.microsoft.com/fwlink/?linkid=2093376) | -This only needs to be done once per machine. Prerelease channels are evergreen, so they will automatically get updated when newer versions are available. +Manual installation only needs to be done once per machine. Prerelease channels are evergreen, so they will automatically get updated when newer versions are available. - -##### Option 2: Programmatically deploy preview channels via API endpoints + + +###### Option 2: Programmatically deploy preview channels via API endpoints In your app's code, you can write your own custom logic to deploy the latest version of the preview channel of Microsoft Edge by doing the following: -1. Call the following API endpoints -2. Fetch the latest package to the device -3. Install the package + +1. Call the following API endpoints. + +1. Fetch the latest package to the device. + +1. Install the package. | Channel | Link | | --- | --- | From 67941a5ca51455d394034c013ba8f1695fdaedab Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Fri, 19 Apr 2024 10:02:55 -0700 Subject: [PATCH 49/61] Update microsoft-edge/webview2/how-to/set-preview-channel.md Co-authored-by: Michael Hoffman --- microsoft-edge/webview2/how-to/set-preview-channel.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microsoft-edge/webview2/how-to/set-preview-channel.md b/microsoft-edge/webview2/how-to/set-preview-channel.md index 44ea439099..a726e0c7ab 100644 --- a/microsoft-edge/webview2/how-to/set-preview-channel.md +++ b/microsoft-edge/webview2/how-to/set-preview-channel.md @@ -207,7 +207,7 @@ Win32: Name: `WEBVIEW2_BROWSER_EXECUTABLE_FOLDER` Value: `` -The environment variable will be applied to all apps that use WebView2 on the machine, unlike the registry key, which can be set per app. +The target app can't be set when using the environment variable approach. Therefore, when set as a global environment, this setting will affect all apps that use WebView2 on the machine. ##### [Group policy](#tab/group-policy) From a4f9b20d4ac2294269f23a08b134d722cd96e8be Mon Sep 17 00:00:00 2001 From: Michael Hoffman Date: Fri, 19 Apr 2024 10:31:33 -0700 Subject: [PATCH 50/61] Incorp cmts as possible, todo's at per-app --- .../webview2/how-to/set-preview-channel.md | 42 ++++++++++++------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/microsoft-edge/webview2/how-to/set-preview-channel.md b/microsoft-edge/webview2/how-to/set-preview-channel.md index 44ea439099..744b010080 100644 --- a/microsoft-edge/webview2/how-to/set-preview-channel.md +++ b/microsoft-edge/webview2/how-to/set-preview-channel.md @@ -6,7 +6,7 @@ ms.author: msedgedevrel ms.topic: conceptual ms.service: microsoft-edge ms.subservice: webview -ms.date: 04/18/2024 +ms.date: 04/19/2024 --- # Test upcoming APIs and features + ##### [Registry key](#tab/registry-key) @@ -207,7 +213,11 @@ Win32: Name: `WEBVIEW2_BROWSER_EXECUTABLE_FOLDER` Value: `` -The environment variable will be applied to all apps that use WebView2 on the machine, unlike the registry key, which can be set per app. +The environment variable will be applied to all apps that use WebView2 on the machine, unlike the registry key, which can be set per-app. + ##### [Group policy](#tab/group-policy) @@ -296,7 +306,11 @@ Replace `WebView2APISample.exe` with your own app executable name or the applica Name: `WEBVIEW2_RELEASE_CHANNELS` Value: `` -The environment variable, if set globally, is applied to all apps that use WebView2 on the machine. In contrast, the registry key can be set per app. +The environment variable, if set globally, is applied to all apps that use WebView2 on the machine. In contrast, the registry key can be set per-app. + ##### [Group policy](#tab/group-policy) @@ -387,21 +401,21 @@ Manual installation only needs to be done once per machine. Prerelease channels ###### Option 2: Programmatically deploy preview channels via API endpoints -In your app's code, you can write your own custom logic to deploy the latest version of the preview channel of Microsoft Edge by doing the following: +In your app's code, write your own custom logic to deploy the latest version of a preview channel of Microsoft Edge as follows: -1. Call the following API endpoints. +1. Call the following API endpoint that corresponds to the preview channel that you want to deploy: -1. Fetch the latest package to the device. + | Channel | Link | + | --- | --- | + | Canary | [https://edgeupdates.microsoft.com/api/products/canary](https://edgeupdates.microsoft.com/api/products/canary)
[MSI Link](https://go.microsoft.com/fwlink/?linkid=2084649&Channel=Canary&language=en)| + | Dev | [https://edgeupdates.microsoft.com/api/products/dev](https://edgeupdates.microsoft.com/api/products/dev) | + | Beta | [https://edgeupdates.microsoft.com/api/products/beta](https://edgeupdates.microsoft.com/api/products/beta) | -1. Install the package. + The Canary channel has a separate MSI link. The Dev and Beta channels contain MSI links. -| Channel | Link | -| --- | --- | -| Canary | [https://edgeupdates.microsoft.com/api/products/canary](https://edgeupdates.microsoft.com/api/products/canary)
[MSI Link](https://go.microsoft.com/fwlink/?linkid=2084649&Channel=Canary&language=en)| -| Dev | [https://edgeupdates.microsoft.com/api/products/dev](https://edgeupdates.microsoft.com/api/products/dev) | -| Beta | [https://edgeupdates.microsoft.com/api/products/beta](https://edgeupdates.microsoft.com/api/products/beta) | +1. Fetch the latest package to the device. -The Edge Dev and Edge Beta channels contain MSI Links. The Edge Canary channel has a separate MSI link. +1. Install the package. From ce90733ad5b59b16bfc127e70d000242fd955704 Mon Sep 17 00:00:00 2001 From: Michael Hoffman Date: Fri, 19 Apr 2024 10:43:25 -0700 Subject: [PATCH 51/61] Reword at "per-app" --- microsoft-edge/webview2/how-to/set-preview-channel.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/microsoft-edge/webview2/how-to/set-preview-channel.md b/microsoft-edge/webview2/how-to/set-preview-channel.md index 6c0ef49ee8..26c7fcf6bb 100644 --- a/microsoft-edge/webview2/how-to/set-preview-channel.md +++ b/microsoft-edge/webview2/how-to/set-preview-channel.md @@ -302,10 +302,7 @@ Replace `WebView2APISample.exe` with your own app executable name or the applica Name: `WEBVIEW2_RELEASE_CHANNELS` Value: `` -The environment variable, if set globally, is applied to all apps that use WebView2 on the machine. In contrast, the registry key can be set per-app. - ##### [Group policy](#tab/group-policy) From e1a3419837b1d26ef885236f23a8982855c4a817 Mon Sep 17 00:00:00 2001 From: Michael Hoffman Date: Fri, 19 Apr 2024 12:28:03 -0700 Subject: [PATCH 52/61] linkfix win32// --- microsoft-edge/webview2/how-to/set-preview-channel.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/microsoft-edge/webview2/how-to/set-preview-channel.md b/microsoft-edge/webview2/how-to/set-preview-channel.md index 26c7fcf6bb..28fab09194 100644 --- a/microsoft-edge/webview2/how-to/set-preview-channel.md +++ b/microsoft-edge/webview2/how-to/set-preview-channel.md @@ -109,9 +109,8 @@ WinRT: Win32: * [ICoreWebView2EnvironmentOptions7::get_ChannelSearchKind](/microsoft-edge/webview2/reference/win32/icorewebview2environmentoptions7#get_channelsearchkind) * [ICoreWebView2EnvironmentOptions7::put_ChannelSearchKind](/microsoft-edge/webview2/reference/win32/icorewebview2environmentoptions7#put_channelsearchkind) -* [COREWEBVIEW2_CHANNEL_SEARCH_KIND enum](/microsoft-edge/webview2/reference/win32//webview2-idl#corewebview2_channel_search_kind) - @@ -41,7 +44,7 @@ You can set the preview channel by using `ChannelSearchKind`, so that your WebVi * If you instead choose to deploy preview channels to devices, see [How to deploy preview channels](./set-preview-channel.md#how-to-deploy-preview-channels) in _Test upcoming APIs and features_. 1. **Conduct automated testing on your app running against the preview channels**: -You can do this automated testing by using WebDriver. See [Automate and test WebView2 apps with Microsoft Edge WebDriver](./webdriver.md). +You can use WebDriver to conduct automated testing of your WebView2 app. See [Automate and test WebView2 apps with Microsoft Edge WebDriver](./webdriver.md). 1. **Compare the results with the baseline**: The baseline for testing should be the latest stable release of WebView2, which can be either the Evergreen WebView2 runtime, or the latest fixed-version Runtime. You can download the Runtime from the [Microsoft Edge WebView2](https://developer.microsoft.com/microsoft-edge/webview2/) page. diff --git a/microsoft-edge/webview2/how-to/self-hosting.md b/microsoft-edge/webview2/how-to/self-hosting.md index d1dd1a5840..2218d93c42 100644 --- a/microsoft-edge/webview2/how-to/self-hosting.md +++ b/microsoft-edge/webview2/how-to/self-hosting.md @@ -6,7 +6,7 @@ ms.author: msedgedevrel ms.topic: conceptual ms.service: microsoft-edge ms.subservice: webview -ms.date: 04/18/2024 +ms.date: 04/22/2024 --- # Self-host by deploying preview channels @@ -14,13 +14,9 @@ _Self-hosting_ means deploying a preview WebView2 Runtime with your app. This a The self-hosting approach provides real-world usage of your app with the latest preview WebView2 Runtime to catch any issues that may arise. You should self-host your app in tandem with doing prerelease testing on your app, to provide a structured approach to testing your app with the latest version of the WebView2 Runtime. -| Approach | Technique | Purpose/value | -|---|---|---| -| Prerelease testing | Automated testing on a preview version of WebView2 Runtime with your app. | Test your app with a preview version of the WebView2 Runtime to find issues before WebView2 upcoming changes reach the Stable Evergreen Runtime. | -| Self-hosting | Deploy a preview version of WebView2 Runtime with your app. | Use your app daily with the preview version of WebView2 Runtime, to find issues before WebView2 changes reach the Stable Evergreen Runtime. | - -See also: -* [Prerelease testing using preview channels](./prerelease-testing.md) +Conduct both automated and manual testing: +* For **automated testing**, do **prerelease testing**, which means testing with a preview version of WebView2 Runtime. See [Prerelease testing using preview channels](./prerelease-testing.md). +* For **manual testing**, use **self-hosting**, which means deploying a preview version of WebView2 Runtime with your app, to use daily by your team. Covered by the present article. @@ -56,7 +52,7 @@ To diagnose or troubleshoot potential preview WebView2 Runtime issues that are r 1. In Windows, open Task Manager. -1. Find your application's process, and then find the **Edge WebView2** child process. +1. Find your application's process, and then find the **WebView2 Manager** child process. 1. Right-click the **Edge WebView2** process, and then select **Open file location**. The folder name is the version number of the Runtime. diff --git a/microsoft-edge/webview2/how-to/set-preview-channel.md b/microsoft-edge/webview2/how-to/set-preview-channel.md index 28fab09194..1228d3495c 100644 --- a/microsoft-edge/webview2/how-to/set-preview-channel.md +++ b/microsoft-edge/webview2/how-to/set-preview-channel.md @@ -232,11 +232,7 @@ Do either of the following: -## FAQs - - - -#### When does the new runtime get picked up? +## When the new runtime gets picked up If you are using an environment variable, registry key, or group policy, they are only applied to any new WebView2 Runtime browser processes that are created; they do not apply to WebView2 Runtime browser processes that are already running. For example, if you already have a WebView2 with a specific user data folder (and therefore a corresponding browser process) and change `ChannelSearchKind` before attempting to create a new WebView2 using that same user data folder, it will use the existing WebView2 Runtime browser process, and not search for a different runtime. @@ -246,8 +242,8 @@ To ensure that all processes use the environment variable, registry key, or grou * Create a new WebView2 that has a different user data folder than any other currently running WebView2 controls. - -#### When using `ChannelSearchKind`, how do I make sure the right channel is picked up when I have multiple preview browser channels? + +## Use `ChannelSearchKind` to ensure that the correct preview browser channel is used In addition to reversing the channel search order, you can modify the set of release channels to include in the search, to provide further control over channel selection. The loader will search for channels on the device in the order specified by the channel search kind, but it will only consider channels that are in the specified set of release channels. @@ -319,14 +315,21 @@ Do either of the following: --- - -#### How to use an environment variable + + +## How to use an environment variable + +You can use multiple approaches to set environment variables: +* Setting environmental variables by using APIs, for a specific app. +* Setting environmental variables globally, for all apps. + +These approaches are described below. - -###### Setting environmental variables using API + +#### Setting environmental variables by using APIs, for a specific app -You can set environment variables by using `SetEnvironmentVariable`. +You can set environment variables by using `SetEnvironmentVariable`. Calling this function from your host app limits the scope of the environment variable to just your host app and the WebView2 controls that it creates, and doesn't affect other apps on the system. * .NET: [Environment.SetEnvironmentVariable Method](/dotnet/api/system.environment.setenvironmentvariable) @@ -335,8 +338,10 @@ You can set environment variables by using `SetEnvironmentVariable`. * Win32: [SetEnvironmentVariable function (winbase.h)](/windows/win32/api/winbase/nf-winbase-setenvironmentvariable) - -###### Setting environmental variables globally + +#### Setting environmental variables globally, for all apps + +You can set environment variables by using the Windows system UI. This approach makes the scope of the environment variable global for the current user or system, and affects all apps that create WebView2 controls. 1. In the Windows search bar, enter "environment", and then select **Edit the system environment variables**: @@ -363,8 +368,8 @@ You can set environment variables by using `SetEnvironmentVariable`. 1. Click the **OK** buttons to close the dialogs. - -#### How to deploy preview channels + +## Deploy preview channels To deploy the preview channels of Microsoft Edge to multiple machines, do either of the following: @@ -375,8 +380,8 @@ To deploy the preview channels of Microsoft Edge to multiple machines, do either These options are explained below. - -###### Option 1: Manually install preview channels on machines + +#### Option 1: Manually install preview channels on machines Insider channels can be manually installed (either manually or through a deployed custom script) through the following enterprise links: @@ -389,8 +394,8 @@ Insider channels can be manually installed (either manually or through a deploye Manual installation only needs to be done once per machine. Prerelease channels are evergreen, so they will automatically get updated when newer versions are available. - -###### Option 2: Programmatically deploy preview channels via API endpoints + +#### Option 2: Programmatically deploy preview channels via API endpoints In your app's code, write your own custom logic to deploy the latest version of a preview channel of Microsoft Edge as follows: From 1faf4b6cbb7b28321d65b0af5bd577889b6f8200 Mon Sep 17 00:00:00 2001 From: Michael Hoffman Date: Mon, 22 Apr 2024 17:03:18 -0700 Subject: [PATCH 54/61] incorp remaining PR comments --- microsoft-edge/toc.yml | 1 + .../webview2/concepts/distribution.md | 26 ++- .../webview2/concepts/versioning.md | 4 + .../webview2/how-to/set-preview-channel.md | 160 ++++++++++-------- 4 files changed, 117 insertions(+), 74 deletions(-) diff --git a/microsoft-edge/toc.yml b/microsoft-edge/toc.yml index 17ba02b14a..368cb44d9f 100644 --- a/microsoft-edge/toc.yml +++ b/microsoft-edge/toc.yml @@ -1379,6 +1379,7 @@ - name: Self-host by deploying preview channels href: webview2/how-to/self-hosting.md + displayName: self-hosting - name: Best Practices items: diff --git a/microsoft-edge/webview2/concepts/distribution.md b/microsoft-edge/webview2/concepts/distribution.md index a373da33d9..01755aceb4 100644 --- a/microsoft-edge/webview2/concepts/distribution.md +++ b/microsoft-edge/webview2/concepts/distribution.md @@ -42,6 +42,7 @@ Cons: +#### Windows 11 devices and Windows 10 devices The Evergreen Runtime is preinstalled onto all Windows 11 devices as a part of the Windows 11 operating system. Microsoft installed the WebView2 Runtime to all eligible Windows 10 devices, as described in [Delivering Microsoft Edge WebView2 Runtime to managed Windows 10 devices](https://blogs.windows.com/msedgedev/2022/12/14/delivering-microsoft-edge-webview2-runtime-to-managed-windows-10-devices/). Even if your app uses the Evergreen distribution mode, we recommend that you distribute the WebView2 Runtime, to cover edge cases where the Runtime wasn't already installed. See [Details about the Evergreen Runtime distribution mode](#details-about-the-evergreen-runtime-distribution-mode) below. @@ -91,10 +92,14 @@ When distributing your WebView2 app, make sure that the WebView2 Runtime is pres If you want to use the Fixed Version distribution mode, you can skip the next couple of sections and jump ahead to [Details about the Fixed Version runtime distribution mode](#details-about-the-fixed-version-runtime-distribution-mode). + + #### Servicing the WebView2 Runtime through Windows Server Update Services (WSUS) See [Windows Server Update Services (WSUS)](enterprise.md#windows-server-update-services-wsus) in _Enterprise management of WebView2 Runtimes_. + + #### Runtime or browser support during development or production During development and testing, a WebView2 app can use either option as the backing web platform: @@ -105,6 +110,8 @@ During development and testing, a WebView2 app can use either option as the back A production release of a WebView2 app can only use the WebView2 Runtime as the backing web platform, not Microsoft Edge. + + ###### Microsoft Edge Stable channel isn't supported for WebView2 WebView2 apps aren't permitted to use the Stable channel of Microsoft Edge as the backing web platform. This restriction prevents a production release of a WebView2 app from taking a dependency on the browser. A WebView2 app cannot take a dependency on the browser during production, for the following reasons: @@ -135,6 +142,7 @@ When you use the Evergreen distribution mode of the WebView2 Runtime, your WebVi +#### Windows 11 devices and Windows 10 devices (details) The vast majority of Windows 10 devices have the WebView2 Runtime installed already, as described in [Delivering Microsoft Edge WebView2 Runtime to managed Windows 10 devices](https://blogs.windows.com/msedgedev/2022/12/14/delivering-microsoft-edge-webview2-runtime-to-managed-windows-10-devices/). A small number of Windows 10 devices don't have the WebView2 Runtime installed. We recommend that you handle this edge case, by using either of the following approaches: @@ -144,10 +152,11 @@ The vast majority of Windows 10 devices have the WebView2 Runtime installed alre * Redirect your end users to the Microsoft site: [Download Microsoft Edge WebView2](https://developer.microsoft.com/microsoft-edge/webview2/consumer/), and have end users download the Evergreen WebView2 Runtime installer from the site and install the Runtime themselves. See also: -* [Understand the different WebView2 SDK versions](versioning.md). +* [Understand the different WebView2 SDK versions](versioning.md) - Use a Prerelease version of the SDK along with a preview channel of Microsoft Edge; or use a Release version of the SDK along with the Runtime. * [Delivering Microsoft Edge WebView2 Runtime to managed Windows 10 devices](https://blogs.windows.com/msedgedev/2022/12/14/delivering-microsoft-edge-webview2-runtime-to-managed-windows-10-devices/). + #### Deploying the Evergreen WebView2 Runtime Only one installation of the Evergreen WebView2 Runtime is needed for all Evergreen apps on the device. Several tools are available at [Download the WebView2 Runtime](https://developer.microsoft.com/microsoft-edge/webview2#download-section) to help you deploy the Evergreen Runtime. @@ -163,6 +172,7 @@ Only one installation of the Evergreen WebView2 Runtime is needed for all Evergr * If you're using App Installer to deploy MSIX applications, you can specify the WebView2 Runtime as a dependency, to have it be installed with the application. For details about how to do this, see [win32dependencies:ExternalDependency (Windows 10, Windows 11)](/uwp/schemas/appxpackage/uapmanifestschema/element-win32dependencies-externaldependency) in the App package manifest docs. See also [Install Windows 10 apps with App Installer](/windows/msix/app-installer/app-installer-root). + #### Installing the Runtime as per-machine or per-user The latest bootstrapper and standalone installer support both _per-machine_ and _per-user_ installs of the WebView2 Runtime. @@ -172,6 +182,8 @@ If you run the installer from an elevated process or command prompt, the Runtime Use the following online deployment workflow or offline deployment workflow to ensure that the Runtime is already installed before your app launches. You can adjust your workflow depending on your scenario. Sample code is available in the [Samples repo](https://github.com/MicrosoftEdge/WebView2Samples#webview2-deployment). + + ###### Detect if a suitable WebView2 Runtime is already installed To verify that a WebView2 Runtime is installed, use one of the following approaches: @@ -198,6 +210,8 @@ To verify that a WebView2 Runtime is installed, use one of the following approac * Approach 2: Run [GetAvailableCoreWebView2BrowserVersionString](/microsoft-edge/webview2/reference/win32/webview2-idl#getavailablecorewebview2browserversionstring) and evaluate whether the `versionInfo` is `nullptr`. `nullptr` indicates that the WebView2 Runtime isn't installed. This API returns version information for the WebView2 Runtime or for any installed preview channels of Microsoft Edge (Beta, Dev, or Canary). + + ###### Online-only deployment If you have an online-only deployment scenario where users are assumed to have internet access, use the following workflow. @@ -228,6 +242,8 @@ The above workflow has several benefits: Alternatively, instead of programmatically downloading the bootstrapper on-demand by getting a link, as shown above, you can package the Evergreen Bootstrapper for the WebView2 Runtime with your app. + + ###### Offline deployment If you have an offline deployment scenario, where app deployment has to work entirely offline, use the following workflow. @@ -249,7 +265,9 @@ If you have an offline deployment scenario, where app deployment has to work ent ``` + #### Test your app for forward-compatibility + The Web is constantly evolving. In the Evergreen distribution mode, the WebView2 Runtime is automatically kept up to date on the client to provide the latest features and security fixes. If you use Evergreen distribution, to ensure that your WebView2 app stays compatible with the web, you should set up testing infrastructure. @@ -259,7 +277,12 @@ To help you decide which channel is right, see [Overview of the Microsoft Edge c See [CreateCoreWebView2EnvironmentWithOptions](/microsoft-edge/webview2/reference/win32/webview2-idl#createcorewebview2environmentwithoptions). You can also use WebDriver to automate WebView2 testing, as described in [Automate, and test WebView2 with Microsoft Edge WebDriver](../how-to/webdriver.md). +See also: +* [Prerelease testing using preview channels](../how-to/prerelease-testing.md) +* [Self-host by deploying preview channels](../how-to/self-hosting.md) + + #### Feature-detect when using recent APIs @@ -350,6 +373,7 @@ To use the Fixed Version distribution mode: ![Permission for PlayReady](./distribution-images/play-ready-permission.png) + #### Known issues for Fixed Version * Currently, Fixed Version cannot be run from a network location or UNC path. diff --git a/microsoft-edge/webview2/concepts/versioning.md b/microsoft-edge/webview2/concepts/versioning.md index 1b37b13811..28c337f497 100644 --- a/microsoft-edge/webview2/concepts/versioning.md +++ b/microsoft-edge/webview2/concepts/versioning.md @@ -67,6 +67,10 @@ Preview channels of Microsoft Edge provide the implementations of Experimental W For information about temporarily pointing your app to a preview channel instead of defaulting to the WebView2 Runtime, see [Test upcoming APIs and features](../how-to/set-preview-channel.md). +See also: +* [Prerelease testing using preview channels](../how-to/prerelease-testing.md) +* [Self-host by deploying preview channels](../how-to/self-hosting.md) + ## Use a release version of the SDK along with the Runtime diff --git a/microsoft-edge/webview2/how-to/set-preview-channel.md b/microsoft-edge/webview2/how-to/set-preview-channel.md index 1228d3495c..46610485f7 100644 --- a/microsoft-edge/webview2/how-to/set-preview-channel.md +++ b/microsoft-edge/webview2/how-to/set-preview-channel.md @@ -6,7 +6,7 @@ ms.author: msedgedevrel ms.topic: conceptual ms.service: microsoft-edge ms.subservice: webview -ms.date: 04/19/2024 +ms.date: 04/22/2024 --- # Test upcoming APIs and features @@ -57,7 +58,7 @@ To use experimental APIs, download a prerelease version of the WebView2 SDK from Preview channels of Microsoft Edge, which include preview WebView2 runtime, are also called _insider channels_. After being installed, the preview channels will stay up-to-date and automatically install the latest versions available for that channel. For example, this means the Canary channel will update itself almost daily. To download a Microsoft Edge preview channel, see [Microsoft Edge Insider Channels](https://www.microsoft.com/edge/download/insider). -To deploy an app to multiple machines, see [how to deploy preview channels](#how-to-deploy-preview-channels). +To deploy the preview channel to multiple machines, see [How to deploy preview channels](#how-to-deploy-preview-channels), below. @@ -93,6 +94,8 @@ Edge Canary -> Edge Dev -> Edge Beta -> WebView2 Runtime (Stable) This must be done before the WebView2 control is initialized. +If you need a more specific order, see [How to use `ChannelSearchKind` to ensure that a particular channel is used](#how-to-use-channelsearchkind-to-ensure-that-a-particular-channel-is-used). + ##### [API](#tab/api) @@ -142,6 +145,9 @@ The target app can't be specified when using the environment variable. Therefor Use the value `1` for the reversed-search order, or `0` for the default search order. +See also: +* [How to set an environment variable](#how-to-set-an-environment-variable), below. + ##### [Group policy](#tab/group-policy) @@ -164,33 +170,42 @@ Do either of the following: -## Setting the browser executable folder (for local testing) +## How to use `ChannelSearchKind` to ensure that a particular channel is used -An alternative approach is to use a browser executable folder. In this approach, you specify a folder that contains runtime binaries. This folder can be any of the following locations: -* The installed location of the WebView2 Runtime. -* A preview channel of Microsoft Edge. -* A folder containing fixed version binaries that you have deployed to the machine yourself. +When using `ChannelSearchKind`, here's how you can make sure that a certain preview browser channel is used, when you have multiple preview browser channels installed. -If you set the browser executable folder to a specific preview channel of Microsoft Edge, you will need to update the location when that preview channel updates to a newer version. This is because the location includes the version number as part of its path. Therefore, we recommend using this approach for local testing only. +In addition to reversing the channel search order, you can modify the set of release channels to include in the search, to provide further control over channel selection. The loader will search for channels on the device in the order specified by the channel search kind, but it will only consider channels that are in the specified set of release channels. +This option is useful if you would like to target a particular channel, instead of simply choosing the most or least stable channel. By default, the release channels includes all channels: Stable (0), Beta (1), Dev (2), and Canary (3). -##### [API](#tab/api) +Example: -Pass the path to the browser executable folder during environment creation, by using the following APIs. +``` +Channel Search Kind: 1 (Least Stable) +Release Channels: 0 (Stable), 1 (Beta) +``` -.NET (WPF): -* [CreationProperties Property](/dotnet/api/microsoft.web.webview2.wpf.webview2.creationproperties) -* [CoreWebView2CreationProperties Class](/dotnet/api/microsoft.web.webview2.wpf.corewebview2creationproperties) +This example setting causes the loader to try to run the app with Edge Beta if Edge Beta is installed on the device, and otherwise fall back to using the Stable WebView2 Runtime. -.NET (WinForms): -* [CreationProperties Property](/dotnet/api/microsoft.web.webview2.winforms.webview2.creationproperties) -* [CoreWebView2CreationProperties Class](/dotnet/api/microsoft.web.webview2.winforms.corewebview2creationproperties) +The release channels can similarly be set through the API, registry key, environment variable, or group policy. + + +##### [API](#tab/api) + +By default, the loader considers all of the release channels. Set `ReleaseChannels` to a mask of the channels you would like the loader to search for. + +.NET: +* [CoreWebView2EnvironmentOptions.ReleaseChannels Property](/dotnet/api/microsoft.web.webview2.core.corewebview2environmentoptions.releasechannels) +* [CoreWebView2ReleaseChannels Enum](/dotnet/api/microsoft.web.webview2.core.corewebview2releasechannels) WinRT: -* [CoreWebView2Environment.CreateWithOptionsAsync Method](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2environment#createwithoptionsasync) +* [CoreWebView2EnvironmentOptions.ReleaseChannels Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2environmentoptions#releasechannels) +* [CoreWebView2ChannelSearchKind Enum](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2releasechannels) Win32: -* [CreateCoreWebView2EnvironmentWithOptions](/microsoft-edge/webview2/reference/win32/webview2-idl?#createcorewebview2environmentwithoptions) +* [ICoreWebView2EnvironmentOptions7::get_ReleaseChannels](/microsoft-edge/webview2/reference/win32/icorewebview2environmentoptions7#get_releasechannels) +* [ICoreWebView2EnvironmentOptions7::put_ReleaseChannels](/microsoft-edge/webview2/reference/win32/icorewebview2environmentoptions7#put_releasechannels) +* [COREWEBVIEW2_RELEASE_CHANNELS enum](/microsoft-edge/webview2/reference/win32/webview2-idl#corewebview2_release_channels) ##### [Registry key](#tab/registry-key) @@ -200,83 +215,67 @@ Win32: 1. Modify and then run the following command: ```reg - REG ADD \Software\Policies\Microsoft\Edge\WebView2\BrowserExecutableFolder /v WebView2APISample.exe /t REG_SZ /d "C:\Users\myname\AppData\Local\Microsoft\Edge SxS\Application\88.0.680.0" + REG ADD \Software\Policies\Microsoft\Edge\WebView2\ReleaseChannels /v WebView2APISample.exe /t REG_SZ /d "0,1" ``` - * Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. - * Replace the sample path with the path to the desired Microsoft Edge preview channel. +Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. Using a wildcard (*) as the value name will apply the override to _all_ WebView2 apps on the machine, and can result in unexpected behavior. ##### [Environment variable](#tab/environment-variable) -Name: `WEBVIEW2_BROWSER_EXECUTABLE_FOLDER` -Value: `` +Name: `WEBVIEW2_RELEASE_CHANNELS` +Value: `` The target app can't be set when using the environment variable approach. Therefore, when set as a global environment, this setting will affect all apps that use WebView2 on the machine. +See also: +* [How to set an environment variable](#how-to-set-an-environment-variable), below. + ##### [Group policy](#tab/group-policy) -Set the `BrowserExecutableFolder` policy. +Set the `ReleaseChannel` policy. -Name: `` -Value: `` +* Name: `` +* Value: `` Do either of the following: -* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). See [Configure Microsoft Edge policy settings on Windows devices](/deployedge/configure-microsoft-edge). +* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). For more information, see [Configure Microsoft Edge policy settings on Windows devices](/deployedge/configure-microsoft-edge). -* Use the built-in policy on Intune. See [Configure Microsoft Edge policy settings in Microsoft Intune](/mem/intune/configuration/administrative-templates-configure-edge). +* Use the built-in policy on Intune. For more information, see [Configure Microsoft Edge policy settings in Microsoft Intune](/mem/intune/configuration/administrative-templates-configure-edge). --- -## When the new runtime gets picked up - -If you are using an environment variable, registry key, or group policy, they are only applied to any new WebView2 Runtime browser processes that are created; they do not apply to WebView2 Runtime browser processes that are already running. For example, if you already have a WebView2 with a specific user data folder (and therefore a corresponding browser process) and change `ChannelSearchKind` before attempting to create a new WebView2 using that same user data folder, it will use the existing WebView2 Runtime browser process, and not search for a different runtime. - -To ensure that all processes use the environment variable, registry key, or group policy, you need to do any of the following: -* Restart the app. -* Re-create the WebView2 controls. -* Create a new WebView2 that has a different user data folder than any other currently running WebView2 controls. - - - -## Use `ChannelSearchKind` to ensure that the correct preview browser channel is used - -In addition to reversing the channel search order, you can modify the set of release channels to include in the search, to provide further control over channel selection. The loader will search for channels on the device in the order specified by the channel search kind, but it will only consider channels that are in the specified set of release channels. - -This option is useful if you would like to target a particular channel, instead of simply choosing the most or least stable channel. By default, the release channels includes all channels: Stable (0), Beta (1), Dev (2), and Canary (3). - -Example: - -``` -Channel Search Kind: 1 (Least Stable) -Release Channels: 0 (Stable), 1 (Beta) -``` +## Setting the browser executable folder (for local testing) -This example setting causes the loader to try to run the app with Edge Beta if Edge Beta is installed on the device, and otherwise fall back to using the Stable WebView2 Runtime. +An alternative approach is to use a browser executable folder. In this approach, you specify a folder that contains runtime binaries. This folder can be any of the following locations: +* The installed location of the WebView2 Runtime. +* A preview channel of Microsoft Edge. +* A folder containing Fixed Version binaries that you have deployed to the machine yourself. -The release channels can similarly be set through the API, registry key, environment variable, or group policy. +If you set the browser executable folder to a specific preview channel of Microsoft Edge, you will need to update the location when that preview channel updates to a newer version. This is because the location includes the version number as part of its path. Therefore, we recommend using this approach for local testing only. ##### [API](#tab/api) -By default, the loader considers all of the release channels. Set `ReleaseChannels` to a mask of the channels you would like the loader to search for. +Pass the path to the browser executable folder during environment creation, by using the following APIs. -.NET: -* [CoreWebView2EnvironmentOptions.ReleaseChannels Property](/dotnet/api/microsoft.web.webview2.core.corewebview2environmentoptions.releasechannels) -* [CoreWebView2ReleaseChannels Enum](/dotnet/api/microsoft.web.webview2.core.corewebview2releasechannels) +.NET (WPF): +* [CreationProperties Property](/dotnet/api/microsoft.web.webview2.wpf.webview2.creationproperties) +* [CoreWebView2CreationProperties Class](/dotnet/api/microsoft.web.webview2.wpf.corewebview2creationproperties) + +.NET (WinForms): +* [CreationProperties Property](/dotnet/api/microsoft.web.webview2.winforms.webview2.creationproperties) +* [CoreWebView2CreationProperties Class](/dotnet/api/microsoft.web.webview2.winforms.corewebview2creationproperties) WinRT: -* [CoreWebView2EnvironmentOptions.ReleaseChannels Property](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2environmentoptions#releasechannels) -* [CoreWebView2ChannelSearchKind Enum](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2releasechannels) +* [CoreWebView2Environment.CreateWithOptionsAsync Method](/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2environment#createwithoptionsasync) Win32: -* [ICoreWebView2EnvironmentOptions7::get_ReleaseChannels](/microsoft-edge/webview2/reference/win32/icorewebview2environmentoptions7#get_releasechannels) -* [ICoreWebView2EnvironmentOptions7::put_ReleaseChannels](/microsoft-edge/webview2/reference/win32/icorewebview2environmentoptions7#put_releasechannels) -* [COREWEBVIEW2_RELEASE_CHANNELS enum](/microsoft-edge/webview2/reference/win32/webview2-idl#corewebview2_release_channels) +* [CreateCoreWebView2EnvironmentWithOptions](/microsoft-edge/webview2/reference/win32/webview2-idl?#createcorewebview2environmentwithoptions) ##### [Registry key](#tab/registry-key) @@ -286,38 +285,53 @@ Win32: 1. Modify and then run the following command: ```reg - REG ADD \Software\Policies\Microsoft\Edge\WebView2\ReleaseChannels /v WebView2APISample.exe /t REG_SZ /d "0,1" + REG ADD \Software\Policies\Microsoft\Edge\WebView2\BrowserExecutableFolder /v WebView2APISample.exe /t REG_SZ /d "C:\Users\myname\AppData\Local\Microsoft\Edge SxS\Application\88.0.680.0" ``` -Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. Using a wildcard (*) as the value name will apply the override to _all_ WebView2 apps on the machine, and can result in unexpected behavior. + * Replace `WebView2APISample.exe` with your own app executable name or the application user model ID. + * Replace the sample path with the path to the desired Microsoft Edge preview channel. ##### [Environment variable](#tab/environment-variable) -Name: `WEBVIEW2_RELEASE_CHANNELS` -Value: `` +Name: `WEBVIEW2_BROWSER_EXECUTABLE_FOLDER` +Value: `` The target app can't be set when using the environment variable approach. Therefore, when set as a global environment, this setting will affect all apps that use WebView2 on the machine. +See also: +* [How to set an environment variable](#how-to-set-an-environment-variable), below. + ##### [Group policy](#tab/group-policy) -Set the `ReleaseChannel` policy. +Set the `BrowserExecutableFolder` policy. -* Name: `` -* Value: `` +Name: `` +Value: `` Do either of the following: -* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). For more information, see [Configure Microsoft Edge policy settings on Windows devices](/deployedge/configure-microsoft-edge). +* Download the Microsoft Edge policy files, which include the WebView2 policy files, from [Download and configure Microsoft Edge for Business](https://www.microsoft.com/edge/business/download). See [Configure Microsoft Edge policy settings on Windows devices](/deployedge/configure-microsoft-edge). -* Use the built-in policy on Intune. For more information, see [Configure Microsoft Edge policy settings in Microsoft Intune](/mem/intune/configuration/administrative-templates-configure-edge). +* Use the built-in policy on Intune. See [Configure Microsoft Edge policy settings in Microsoft Intune](/mem/intune/configuration/administrative-templates-configure-edge). --- -## How to use an environment variable +## When the new runtime gets picked up + +If you are using an environment variable, registry key, or group policy, they are only applied to any new WebView2 Runtime browser processes that are created; they do not apply to WebView2 Runtime browser processes that are already running. For example, if you already have a WebView2 with a specific user data folder (and therefore a corresponding browser process) and change `ChannelSearchKind` before attempting to create a new WebView2 using that same user data folder, it will use the existing WebView2 Runtime browser process, and not search for a different runtime. + +To ensure that all processes use the environment variable, registry key, or group policy, you need to do any of the following: +* Restart the app. +* Re-create all of the WebView2 controls that share a user data folder. +* Create a new WebView2 that has a different user data folder than any other currently running WebView2 controls. + + + +## How to set an environment variable You can use multiple approaches to set environment variables: * Setting environmental variables by using APIs, for a specific app. @@ -369,7 +383,7 @@ You can set environment variables by using the Windows system UI. This approach -## Deploy preview channels +## How to deploy preview channels To deploy the preview channels of Microsoft Edge to multiple machines, do either of the following: From a87a1ad39257ccbcbc957c848f5a4732ad151356 Mon Sep 17 00:00:00 2001 From: Michael Hoffman Date: Tue, 23 Apr 2024 15:42:54 -0700 Subject: [PATCH 55/61] remove use of 2 trailing spaces --- .../webview2/how-to/prerelease-testing.md | 18 ++++++++----- .../webview2/how-to/self-hosting.md | 15 ++++++----- .../webview2/how-to/set-preview-channel.md | 26 +++++++------------ 3 files changed, 30 insertions(+), 29 deletions(-) diff --git a/microsoft-edge/webview2/how-to/prerelease-testing.md b/microsoft-edge/webview2/how-to/prerelease-testing.md index 2016ae33ac..7092acac2e 100644 --- a/microsoft-edge/webview2/how-to/prerelease-testing.md +++ b/microsoft-edge/webview2/how-to/prerelease-testing.md @@ -36,18 +36,22 @@ Start with automated testing against the Microsoft Edge **Canary** channel, whic To do automated testing: -1. **Set the preview channel for your app**: -You can set the preview channel by using `ChannelSearchKind`, so that your WebView2 app uses the least-stable channel (Canary, then Dev). To do this, see [Switching the channel search order (recommended)](./set-preview-channel.md#switching-the-channel-search-order-recommended) in _Test upcoming APIs and features_. +1. **Set the preview channel for your app.** + + You can set the preview channel by using `ChannelSearchKind`, so that your WebView2 app uses the least-stable channel (Canary, then Dev). To do this, see [Switching the channel search order (recommended)](./set-preview-channel.md#switching-the-channel-search-order-recommended) in _Test upcoming APIs and features_. + +1. **Install or deploy the preview channel.** -1. **Install or deploy the preview channel**: * If you choose to install preview channels manually, install them from [Microsoft Edge Insider Channels](https://www.microsoft.com/edge/download/insider). * If you instead choose to deploy preview channels to devices, see [How to deploy preview channels](./set-preview-channel.md#how-to-deploy-preview-channels) in _Test upcoming APIs and features_. -1. **Conduct automated testing on your app running against the preview channels**: -You can use WebDriver to conduct automated testing of your WebView2 app. See [Automate and test WebView2 apps with Microsoft Edge WebDriver](./webdriver.md). +1. **Conduct automated testing on your app running against the preview channels.** + + You can use WebDriver to conduct automated testing of your WebView2 app. See [Automate and test WebView2 apps with Microsoft Edge WebDriver](./webdriver.md). + +1. **Compare the results with the baseline.** -1. **Compare the results with the baseline**: -The baseline for testing should be the latest stable release of WebView2, which can be either the Evergreen WebView2 runtime, or the latest fixed-version Runtime. You can download the Runtime from the [Microsoft Edge WebView2](https://developer.microsoft.com/microsoft-edge/webview2/) page. + The baseline for testing should be the latest stable release of WebView2, which can be either the Evergreen WebView2 runtime, or the latest fixed-version Runtime. You can download the Runtime from the [Microsoft Edge WebView2](https://developer.microsoft.com/microsoft-edge/webview2/) page. Upon finding issues, you can report them via the [Microsoft Edge / WebView2Feedback repo](https://github.com/MicrosoftEdge/WebView2Feedback). Under the `Runtime Channel` section, be sure to indicate that you found the issue on a preview channel, so that the fix can be prioritized before the bug ships in the Stable release. diff --git a/microsoft-edge/webview2/how-to/self-hosting.md b/microsoft-edge/webview2/how-to/self-hosting.md index 2218d93c42..6b6519ba7a 100644 --- a/microsoft-edge/webview2/how-to/self-hosting.md +++ b/microsoft-edge/webview2/how-to/self-hosting.md @@ -29,14 +29,17 @@ The Canary channel is also suitable, but it might be less stable for daily use. To self-host a preview channel of WebView2: -1. **Set the preview channel for your app**: -You can [set the preview channel by using ChannelSearchKind](./set-preview-channel.md#switching-the-channel-search-order-recommended), making it such that your WebView2 app uses the least-stable channel on the device. We recommend using either the Registry Key or Group Policy for self-hosting. +1. **Set the preview channel for your app.** -1. **Install the preview channel on your team's machines**: -To install on handful of devices, you can download and install them manually from [Microsoft Edge Insider Channels](https://www.microsoft.com/edge/download/insider). To deploy them to multiple devices, see [how to deploy preview channels](./set-preview-channel.md#how-to-deploy-preview-channels). + You can [set the preview channel by using ChannelSearchKind](./set-preview-channel.md#switching-the-channel-search-order-recommended), making it such that your WebView2 app uses the least-stable channel on the device. We recommend using either the Registry Key or Group Policy for self-hosting. -1. **Use your app daily with the preview channel of WebView2, and diagnose potential issues with the WebView2 Runtime:** -See [Diagnose potential issues with the WebView2 Runtime](#diagnose-potential-issues-with-the-webview2-runtime), below. +1. **Install the preview channel on your team's machines.** + + To install on handful of devices, you can download and install them manually from [Microsoft Edge Insider Channels](https://www.microsoft.com/edge/download/insider). To deploy them to multiple devices, see [how to deploy preview channels](./set-preview-channel.md#how-to-deploy-preview-channels). + +1. **Use your app daily with the preview channel of WebView2, and diagnose potential issues with the WebView2 Runtime.** + + See [Diagnose potential issues with the WebView2 Runtime](#diagnose-potential-issues-with-the-webview2-runtime), below. Upon finding issues, you can report them via the [Microsoft Edge / WebView2Feedback repo](https://github.com/MicrosoftEdge/WebView2Feedback). Under the `Runtime Channel` section, be sure to indicate that you found the issue on a preview channel, so that the fix can be prioritized before the bug ships in the Stable release. diff --git a/microsoft-edge/webview2/how-to/set-preview-channel.md b/microsoft-edge/webview2/how-to/set-preview-channel.md index 46610485f7..9ad10dcc0a 100644 --- a/microsoft-edge/webview2/how-to/set-preview-channel.md +++ b/microsoft-edge/webview2/how-to/set-preview-channel.md @@ -113,12 +113,6 @@ Win32: * [ICoreWebView2EnvironmentOptions7::get_ChannelSearchKind](/microsoft-edge/webview2/reference/win32/icorewebview2environmentoptions7#get_channelsearchkind) * [ICoreWebView2EnvironmentOptions7::put_ChannelSearchKind](/microsoft-edge/webview2/reference/win32/icorewebview2environmentoptions7#put_channelsearchkind) * [COREWEBVIEW2_CHANNEL_SEARCH_KIND enum](/microsoft-edge/webview2/reference/win32/webview2-idl#corewebview2_channel_search_kind) - ##### [Registry key](#tab/registry-key) @@ -138,8 +132,8 @@ Use the value `1` for the reversed-search order, or `0` for the default search o ##### [Environment variable](#tab/environment-variable) -Name: `WEBVIEW2_CHANNEL_SEARCH_KIND` -Value: `1` +* Name: `WEBVIEW2_CHANNEL_SEARCH_KIND` +* Value: `1` The target app can't be specified when using the environment variable. Therefore, when set as a global environment, it will affect all apps that use WebView2 on the machine. @@ -153,7 +147,7 @@ See also: Set the `ChannelSearchKind` policy. -* Name: `` +* Name: `` * Value: `1` Use the value `1` for the reversed-search order, or `0` for the default search order. @@ -223,8 +217,8 @@ Replace `WebView2APISample.exe` with your own app executable name or the applica ##### [Environment variable](#tab/environment-variable) -Name: `WEBVIEW2_RELEASE_CHANNELS` -Value: `` +* Name: `WEBVIEW2_RELEASE_CHANNELS` +* Value: `` The target app can't be set when using the environment variable approach. Therefore, when set as a global environment, this setting will affect all apps that use WebView2 on the machine. @@ -236,7 +230,7 @@ See also: Set the `ReleaseChannel` policy. -* Name: `` +* Name: `` * Value: `` Do either of the following: @@ -294,8 +288,8 @@ Win32: ##### [Environment variable](#tab/environment-variable) -Name: `WEBVIEW2_BROWSER_EXECUTABLE_FOLDER` -Value: `` +* Name: `WEBVIEW2_BROWSER_EXECUTABLE_FOLDER` +* Value: `` The target app can't be set when using the environment variable approach. Therefore, when set as a global environment, this setting will affect all apps that use WebView2 on the machine. @@ -307,8 +301,8 @@ See also: Set the `BrowserExecutableFolder` policy. -Name: `` -Value: `` +* Name: `` +* Value: `` Do either of the following: From 4a377ad323c8b94bb8287b7483c2f1f965541df0 Mon Sep 17 00:00:00 2001 From: Michael Hoffman Date: Tue, 23 Apr 2024 15:48:32 -0700 Subject: [PATCH 56/61] linkfix anchor, update link text --- microsoft-edge/webview2/how-to/webdriver.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microsoft-edge/webview2/how-to/webdriver.md b/microsoft-edge/webview2/how-to/webdriver.md index 9075340940..9ed1622798 100644 --- a/microsoft-edge/webview2/how-to/webdriver.md +++ b/microsoft-edge/webview2/how-to/webdriver.md @@ -241,7 +241,7 @@ For more info about the `DebuggerAddress` property of the `EdgeOptions` object, 1. Do the steps in [Remote debugging UWP apps with Remote Tools for Microsoft Edge](./remote-debugging.md). - This WebView2 feature is currently only supported in the Canary preview channel of Microsoft Edge. Set the environment variable `WEBVIEW2_RELEASE_CHANNEL_PREFERENCE=1`, to ensure that the WebView2 version is Canary. For more information, see [Using an environment variable](./set-preview-channel.md#how-to-use-an-environment-variable) in _Test upcoming APIs and features_. + This WebView2 feature is currently only supported in the Canary preview channel of Microsoft Edge. Set the environment variable `WEBVIEW2_RELEASE_CHANNEL_PREFERENCE=1`, to ensure that the WebView2 version is Canary. For more information, see [How to set an environment variable](./set-preview-channel.md#how-to-set-an-environment-variable) in _Test upcoming APIs and features_. ![Settings for UWP app](./webdriver-images/sample-uwp-settings.png) From 29b82e53d790908dbd9d897a9d633b319d35dafc Mon Sep 17 00:00:00 2001 From: Victor Huang Date: Tue, 23 Apr 2024 16:20:41 -0700 Subject: [PATCH 57/61] Directly refer users to the two documents --- microsoft-edge/webview2/concepts/distribution.md | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/microsoft-edge/webview2/concepts/distribution.md b/microsoft-edge/webview2/concepts/distribution.md index 01755aceb4..ab8a9a1e03 100644 --- a/microsoft-edge/webview2/concepts/distribution.md +++ b/microsoft-edge/webview2/concepts/distribution.md @@ -271,16 +271,7 @@ If you have an offline deployment scenario, where app deployment has to work ent The Web is constantly evolving. In the Evergreen distribution mode, the WebView2 Runtime is automatically kept up to date on the client to provide the latest features and security fixes. If you use Evergreen distribution, to ensure that your WebView2 app stays compatible with the web, you should set up testing infrastructure. -Microsoft Edge preview channels (Beta, Dev, and Canary) provide a sneak peek into what is coming next in the WebView2 Runtime. Test your WebView2 app regularly against a Microsoft Edge preview channel, and update your app or [report issues](https://github.com/MicrosoftEdge/WebViewFeedback) if issues arise. Canary is the recommended preview channel, because it ships at the fastest cadence and has the newest APIs. - -To help you decide which channel is right, see [Overview of the Microsoft Edge channels](/deployedge/microsoft-edge-channels). You can [Download Microsoft Edge Insider Channels](https://www.microsoft.com/edge/download/insider) on your test environment, and use `regkey` or environment variables to indicate the channel preference for your testing app. - -See [CreateCoreWebView2EnvironmentWithOptions](/microsoft-edge/webview2/reference/win32/webview2-idl#createcorewebview2environmentwithoptions). You can also use WebDriver to automate WebView2 testing, as described in [Automate, and test WebView2 with Microsoft Edge WebDriver](../how-to/webdriver.md). - -See also: -* [Prerelease testing using preview channels](../how-to/prerelease-testing.md) -* [Self-host by deploying preview channels](../how-to/self-hosting.md) - +Refer to [Prerelease testing using preview channels](../how-to/prerelease-testing.md) and [Self-host by deploying preview channels](../how-to/self-hosting.md) for best practices on how to test your app for forward-compatibility. #### Feature-detect when using recent APIs From 21e2629196bf70d82c25b7e445c5b28171b6c327 Mon Sep 17 00:00:00 2001 From: Michael Hoffman Date: Wed, 24 Apr 2024 06:54:26 -0700 Subject: [PATCH 58/61] Evergreen WebView2 Runtime --- microsoft-edge/webview2/concepts/distribution.md | 5 +++-- microsoft-edge/webview2/concepts/versioning.md | 2 +- microsoft-edge/webview2/how-to/set-preview-channel.md | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/microsoft-edge/webview2/concepts/distribution.md b/microsoft-edge/webview2/concepts/distribution.md index ab8a9a1e03..1c75a37a23 100644 --- a/microsoft-edge/webview2/concepts/distribution.md +++ b/microsoft-edge/webview2/concepts/distribution.md @@ -152,7 +152,7 @@ The vast majority of Windows 10 devices have the WebView2 Runtime installed alre * Redirect your end users to the Microsoft site: [Download Microsoft Edge WebView2](https://developer.microsoft.com/microsoft-edge/webview2/consumer/), and have end users download the Evergreen WebView2 Runtime installer from the site and install the Runtime themselves. See also: -* [Understand the different WebView2 SDK versions](versioning.md) - Use a Prerelease version of the SDK along with a preview channel of Microsoft Edge; or use a Release version of the SDK along with the Runtime. +* [Understand the different WebView2 SDK versions](versioning.md) - Use a Prerelease version of the SDK along with a preview channel of Microsoft Edge; or use a Release version of the SDK along with the Evergreen WebView2 Runtime. * [Delivering Microsoft Edge WebView2 Runtime to managed Windows 10 devices](https://blogs.windows.com/msedgedev/2022/12/14/delivering-microsoft-edge-webview2-runtime-to-managed-windows-10-devices/). @@ -271,7 +271,8 @@ If you have an offline deployment scenario, where app deployment has to work ent The Web is constantly evolving. In the Evergreen distribution mode, the WebView2 Runtime is automatically kept up to date on the client to provide the latest features and security fixes. If you use Evergreen distribution, to ensure that your WebView2 app stays compatible with the web, you should set up testing infrastructure. -Refer to [Prerelease testing using preview channels](../how-to/prerelease-testing.md) and [Self-host by deploying preview channels](../how-to/self-hosting.md) for best practices on how to test your app for forward-compatibility. +For best practices on how to test your app for forward-compatibility, see [Prerelease testing using preview channels](../how-to/prerelease-testing.md) and [Self-host by deploying preview channels](../how-to/self-hosting.md). + #### Feature-detect when using recent APIs diff --git a/microsoft-edge/webview2/concepts/versioning.md b/microsoft-edge/webview2/concepts/versioning.md index 28c337f497..e9f4afaed2 100644 --- a/microsoft-edge/webview2/concepts/versioning.md +++ b/microsoft-edge/webview2/concepts/versioning.md @@ -75,7 +75,7 @@ See also: ## Use a release version of the SDK along with the Runtime -When you use a WebView2 Release SDK package, use the WebView2 Evergreen _Runtime_ on your development client, rather than a Microsoft Edge preview channel. By default, a WebView2 app targets the Runtime rather than Microsoft Edge. By design, the Microsoft Edge Stable channel doesn't support WebView2. +When you use a WebView2 Release SDK package, use the Evergreen WebView2 _Runtime_ on your development client, rather than a Microsoft Edge preview channel. By default, a WebView2 app targets the Runtime rather than Microsoft Edge. By design, the Microsoft Edge Stable channel doesn't support WebView2. The Release SDK package contains all of the Stable Win32 C/C++ and .NET APIs that are in production release, and doesn't include method signatures for Experimental APIs. All of the APIs that are in a Release SDK package are fully supported, in an equal or higher build number of the WebView2 Runtime. diff --git a/microsoft-edge/webview2/how-to/set-preview-channel.md b/microsoft-edge/webview2/how-to/set-preview-channel.md index 9ad10dcc0a..6c4c3d5d32 100644 --- a/microsoft-edge/webview2/how-to/set-preview-channel.md +++ b/microsoft-edge/webview2/how-to/set-preview-channel.md @@ -21,7 +21,7 @@ We recommend that you test the Experimental APIs ahead of time, before they are See also: * [Phases of introducing APIs](../concepts/versioning.md#phases-of-introducing-apis) in _Understand the different WebView2 SDK versions_. -* [Understand the different WebView2 SDK versions](../concepts/versioning.md) - Use a Prerelease version of the SDK along with a preview channel of Microsoft Edge; or use a Release version of the SDK along with the Runtime. +* [Understand the different WebView2 SDK versions](../concepts/versioning.md) - Use a Prerelease version of the SDK along with a preview channel of Microsoft Edge; or use a Release version of the SDK along with the Evergreen WebView2 Runtime. From baf70013ae7457741304198037a5358acef9b4c2 Mon Sep 17 00:00:00 2001 From: Michael Hoffman Date: Wed, 24 Apr 2024 09:56:44 -0700 Subject: [PATCH 59/61] remove todo cmt --- microsoft-edge/webview2/concepts/distribution.md | 1 - 1 file changed, 1 deletion(-) diff --git a/microsoft-edge/webview2/concepts/distribution.md b/microsoft-edge/webview2/concepts/distribution.md index 1c75a37a23..5b61af3658 100644 --- a/microsoft-edge/webview2/concepts/distribution.md +++ b/microsoft-edge/webview2/concepts/distribution.md @@ -267,7 +267,6 @@ If you have an offline deployment scenario, where app deployment has to work ent #### Test your app for forward-compatibility - The Web is constantly evolving. In the Evergreen distribution mode, the WebView2 Runtime is automatically kept up to date on the client to provide the latest features and security fixes. If you use Evergreen distribution, to ensure that your WebView2 app stays compatible with the web, you should set up testing infrastructure. From 2fbce4264eeb34ac43512c8f83848070e8621ccf Mon Sep 17 00:00:00 2001 From: Michael Hoffman Date: Wed, 24 Apr 2024 14:40:50 -0700 Subject: [PATCH 60/61] global update Preview Insider channels link text --- .../webview2/concepts/developer-guide.md | 6 ++++-- microsoft-edge/webview2/get-started/winui.md | 14 ++++---------- microsoft-edge/webview2/get-started/wpf.md | 4 +++- microsoft-edge/webview2/how-to/machine-setup.md | 4 +++- .../webview2/how-to/prerelease-testing.md | 16 +++++++--------- microsoft-edge/webview2/how-to/self-hosting.md | 8 ++++---- .../webview2/how-to/set-preview-channel.md | 6 +++--- microsoft-edge/webview2/index.md | 5 ++++- .../webview2/samples/webview2browser.md | 2 +- 9 files changed, 33 insertions(+), 32 deletions(-) diff --git a/microsoft-edge/webview2/concepts/developer-guide.md b/microsoft-edge/webview2/concepts/developer-guide.md index ec99c4d001..6358fd7d7f 100644 --- a/microsoft-edge/webview2/concepts/developer-guide.md +++ b/microsoft-edge/webview2/concepts/developer-guide.md @@ -23,9 +23,11 @@ If you use the Evergreen runtime, before running your WebView2 app, test whether ## Run compatibility tests regularly when using the Evergreen Runtime -When using the Evergreen WebView2 Runtime, the runtime updates automatically, so you must regularly run compatibility tests. To ensure that your WebView2 app will continue to work as expected, test your web content in the WebView2 control against [Microsoft Edge Insider (preview) Channels](https://www.microsoft.com/edge/download/insider) (Beta, Dev, or Canary). +When using the Evergreen WebView2 Runtime, the runtime updates automatically, so you must regularly run compatibility tests. To ensure that your WebView2 app will continue to work as expected, test your web content in the WebView2 control against the Microsoft Edge preview channels (Beta, Dev, or Canary). The preview channels are also called _Insider channels_. -This guidance is similar to the guidance that we give to web developers. See [Test your app for forward-compatibility](../concepts/distribution.md#test-your-app-for-forward-compatibility). +The above guidance is similar to the guidance for web developers. See [Test your app for forward-compatibility](../concepts/distribution.md#test-your-app-for-forward-compatibility). + +To download the preview channels of Microsoft Edge, go to [Become a Microsoft Edge Insider](https://www.microsoft.com/edge/download/insider). diff --git a/microsoft-edge/webview2/get-started/winui.md b/microsoft-edge/webview2/get-started/winui.md index 083d7337f4..b7c71daa59 100644 --- a/microsoft-edge/webview2/get-started/winui.md +++ b/microsoft-edge/webview2/get-started/winui.md @@ -47,17 +47,11 @@ For this sample, you don't need to separately install the WebView2 SDK. Below, ## Step 2 - Install a preview channel of Microsoft Edge -1. Install the [WebView2 Runtime](https://developer.microsoft.com/microsoft-edge/webview2) or any [Microsoft Edge preview channel](https://www.microsoft.com/edge/download/insider) (Beta, Dev, or Canary) installed on Windows 10 version 1803 (build 17134) or later. +1. Install the WebView2 Runtime on devices that have Windows 10 version 1803 (build 17134) or later, by installing from either location: + * To directly download just the Runtime, use the **Download the WebView2 Runtime** section of the [Microsoft Edge WebView2](https://developer.microsoft.com/microsoft-edge/webview2) page at `developer.microsoft.com`. + * To download and install a Microsoft Edge preview channel (Beta, Dev, or Canary), go to [Become a Microsoft Edge Insider](https://www.microsoft.com/edge/download/insider). The preview channels are also called _Insider channels_. The preview channels include the WebView2 Runtime. -Return from that page and continue the steps below. - - +Then continue with the steps below. diff --git a/microsoft-edge/webview2/get-started/wpf.md b/microsoft-edge/webview2/get-started/wpf.md index b11258d40e..f5dd55789e 100644 --- a/microsoft-edge/webview2/get-started/wpf.md +++ b/microsoft-edge/webview2/get-started/wpf.md @@ -56,10 +56,12 @@ This tutorial also works with Visual Studio 2017. See [Visual Studio older down ## Step 2 - Install a preview channel of Microsoft Edge -1. Download any [Microsoft Edge Insider (preview) Channel](https://www.microsoft.com/edge/download/insider) (Beta, Dev, or Canary) on a supported operating system (OS): +1. Download any Microsoft Edge preview channel (Beta, Dev, or Canary) on a supported operating system: * Windows 10 * Windows 11 + To do this, go to [Become a Microsoft Edge Insider](https://www.microsoft.com/edge/download/insider). The preview channels are also called _Insider channels_. + We recommend using the Canary channel of Microsoft Edge. The minimum required version is 82.0.488.0. diff --git a/microsoft-edge/webview2/how-to/machine-setup.md b/microsoft-edge/webview2/how-to/machine-setup.md index 6845e8c947..473289bd62 100644 --- a/microsoft-edge/webview2/how-to/machine-setup.md +++ b/microsoft-edge/webview2/how-to/machine-setup.md @@ -26,10 +26,12 @@ This article covers general-purpose setup of your development environment for We ## Install a preview channel of Microsoft Edge -1. Install any [Microsoft Edge Insider (preview) Channel](https://www.microsoft.com/edge/download/insider) (Beta, Dev, or Canary) on a supported operating system (OS): +Install any Microsoft Edge preview channel (Beta, Dev, or Canary) on a supported operating system: * Windows 10 * Windows 11 +To do this, go to [Become a Microsoft Edge Insider](https://www.microsoft.com/edge/download/insider). The preview channels are also called _Insider channels_. + We recommend using the Canary channel. The minimum required version is 82.0.488.0. The preview channels of Microsoft Edge are required in order to use a prerelease version of the WebView2 SDK. A prerelease SDK enables testing your app against the latest APIs, and trying out the latest APIs. diff --git a/microsoft-edge/webview2/how-to/prerelease-testing.md b/microsoft-edge/webview2/how-to/prerelease-testing.md index 7092acac2e..5990bdeddf 100644 --- a/microsoft-edge/webview2/how-to/prerelease-testing.md +++ b/microsoft-edge/webview2/how-to/prerelease-testing.md @@ -13,12 +13,8 @@ ms.date: 04/22/2024 _Prerelease testing_ means testing your WebView2 app by using the preview channels of Microsoft Edge to find issues that will affect your particular WebView2 app, before any changes ship in the Stable Evergreen WebView2 Runtime. This helps catch any bugs before they degrade the app experience for end users. Conduct both automated and manual testing: -* For **automated testing**, do **prerelease testing**, which means testing with a preview version of WebView2 Runtime. Covered by the present article. -* For **manual testing**, use **self-hosting**, which means deploying a preview version of WebView2 Runtime with your app, to use daily by your team. See [Self-host by deploying preview channels](./self-hosting.md). - -See also: -* [Overview of the Microsoft Edge channels](/deployedge/microsoft-edge-channels) -* [Become a Microsoft Edge Insider](https://www.microsoft.com/edge/download/insider) - download Edge Canary, Edge Dev, or Edge Beta. +* For **automated testing**, do **prerelease testing**, which means testing with a preview version of the WebView2 Runtime. Covered by the present article. +* For **manual testing**, use **self-hosting**, which means deploying a preview version of the WebView2 Runtime with your app, to use daily by your team. See [Self-host by deploying preview channels](./self-hosting.md). @@ -26,7 +22,7 @@ See also: Evergreen WebView2 is based on the evergreen Chromium platform, which receives monthly major updates. Regressions in WebView2 apps tend to be application-specific, rather than affecting all WebView2 apps. WebView2 is tested in a variety of general scenarios, but it's possible that some of the specific scenarios of your app are not covered. -To catch app-specific regressions before WebView2 changes ship in Edge Stable, test your WebView2 app against the preview runtime that shipped with the preview channels of Microsoft Edge (Edge Canary, Edge Dev, or Edge Beta). +To catch app-specific regressions before WebView2 changes ship in Edge Stable, test your WebView2 app against the preview WebView2 Runtime that's shipped with the preview channels of Microsoft Edge (Canary, Dev, and Beta). To manually install the preview channels, go to [Become a Microsoft Edge Insider](https://www.microsoft.com/edge/download/insider). The preview channels are also called _Insider channels_. @@ -34,6 +30,8 @@ To catch app-specific regressions before WebView2 changes ship in Edge Stable, t Start with automated testing against the Microsoft Edge **Canary** channel, which ships daily. This enables you to catch issues as early as possible. The Microsoft Edge **Dev** channel ships weekly, and is also a good option. +Start with automated testing against the preview WebView2 Runtime in the Microsoft Edge **Canary** channel, which ships daily. This enables you to catch issues as early as possible. The Microsoft Edge **Dev** channel ships weekly, and is also a good option. + To do automated testing: 1. **Set the preview channel for your app.** @@ -42,7 +40,7 @@ To do automated testing: 1. **Install or deploy the preview channel.** - * If you choose to install preview channels manually, install them from [Microsoft Edge Insider Channels](https://www.microsoft.com/edge/download/insider). + * If you choose to install preview channels manually, install them from the page [Become a Microsoft Edge Insider](https://www.microsoft.com/edge/download/insider). * If you instead choose to deploy preview channels to devices, see [How to deploy preview channels](./set-preview-channel.md#how-to-deploy-preview-channels) in _Test upcoming APIs and features_. 1. **Conduct automated testing on your app running against the preview channels.** @@ -65,4 +63,4 @@ Upon finding issues, you can report them via the [Microsoft Edge / WebView2Feedb * [WebView2 feedback repo](https://github.com/MicrosoftEdge/WebView2Feedback) * [Site compatibility-impacting changes coming to Microsoft Edge](/microsoft-edge/web-platform/site-impacting-changes) * [Overview of the Microsoft Edge channels](/deployedge/microsoft-edge-channels) -* [Become a Microsoft Edge Insider](https://www.microsoft.com/edge/download/insider) - download Edge Canary, Edge Dev, or Edge Beta +* [Become a Microsoft Edge Insider](https://www.microsoft.com/edge/download/insider) - download Edge Canary, Edge Dev, or Edge Beta. diff --git a/microsoft-edge/webview2/how-to/self-hosting.md b/microsoft-edge/webview2/how-to/self-hosting.md index 6b6519ba7a..110d606588 100644 --- a/microsoft-edge/webview2/how-to/self-hosting.md +++ b/microsoft-edge/webview2/how-to/self-hosting.md @@ -15,8 +15,8 @@ _Self-hosting_ means deploying a preview WebView2 Runtime with your app. This a The self-hosting approach provides real-world usage of your app with the latest preview WebView2 Runtime to catch any issues that may arise. You should self-host your app in tandem with doing prerelease testing on your app, to provide a structured approach to testing your app with the latest version of the WebView2 Runtime. Conduct both automated and manual testing: -* For **automated testing**, do **prerelease testing**, which means testing with a preview version of WebView2 Runtime. See [Prerelease testing using preview channels](./prerelease-testing.md). -* For **manual testing**, use **self-hosting**, which means deploying a preview version of WebView2 Runtime with your app, to use daily by your team. Covered by the present article. +* For **automated testing**, do **prerelease testing**, which means testing with a preview version of the WebView2 Runtime. See [Prerelease testing using preview channels](./prerelease-testing.md). +* For **manual testing**, use **self-hosting**, which means deploying a preview version of the WebView2 Runtime with your app, to use daily by your team. Covered by the present article. @@ -35,7 +35,7 @@ To self-host a preview channel of WebView2: 1. **Install the preview channel on your team's machines.** - To install on handful of devices, you can download and install them manually from [Microsoft Edge Insider Channels](https://www.microsoft.com/edge/download/insider). To deploy them to multiple devices, see [how to deploy preview channels](./set-preview-channel.md#how-to-deploy-preview-channels). + To install preview channels on a small number of devices, you can download and install them manually from the page [Become a Microsoft Edge Insider](https://www.microsoft.com/edge/download/insider). To deploy preview channels to a large number of devices, see [How to deploy preview channels](./set-preview-channel.md#how-to-deploy-preview-channels) in _Test upcoming APIs and features_. 1. **Use your app daily with the preview channel of WebView2, and diagnose potential issues with the WebView2 Runtime.** @@ -87,4 +87,4 @@ If you are using the API, then we recommend building UI in your app that allows * [Prerelease testing using preview channels](./prerelease-testing.md) * [WebView2 feedback repo](https://github.com/MicrosoftEdge/WebView2Feedback) * [Site compatibility-impacting changes coming to Microsoft Edge](../../web-platform/site-impacting-changes.md) -* [Microsoft Edge Insider website](https://www.microsoft.com/edge/download/insider) - download the Canary, Dev, or Beta channel of Microsoft Edge +* [Become a Microsoft Edge Insider](https://www.microsoft.com/edge/download/insider) - download the Canary, Dev, or Beta channel of Microsoft Edge. diff --git a/microsoft-edge/webview2/how-to/set-preview-channel.md b/microsoft-edge/webview2/how-to/set-preview-channel.md index 6c4c3d5d32..15cef78975 100644 --- a/microsoft-edge/webview2/how-to/set-preview-channel.md +++ b/microsoft-edge/webview2/how-to/set-preview-channel.md @@ -56,7 +56,7 @@ We recommend that you test upcoming changes using preview channels to ensure you To use experimental APIs, download a prerelease version of the WebView2 SDK from [Microsoft.Web.WebView2 package](https://www.nuget.org/packages/Microsoft.Web.WebView2). -Preview channels of Microsoft Edge, which include preview WebView2 runtime, are also called _insider channels_. After being installed, the preview channels will stay up-to-date and automatically install the latest versions available for that channel. For example, this means the Canary channel will update itself almost daily. To download a Microsoft Edge preview channel, see [Microsoft Edge Insider Channels](https://www.microsoft.com/edge/download/insider). +Preview channels of Microsoft Edge include the preview WebView2 Runtime. Preview channels are also called _Insider channels_. After being installed, the preview channels stay up-to-date; the latest version of each preview channel is automatically installed. For example, this means the Canary channel will update itself almost daily. To download a Microsoft Edge preview channel (Canary, Dev, or Beta), go to [Become a Microsoft Edge Insider](https://www.microsoft.com/edge/download/insider). To deploy the preview channel to multiple machines, see [How to deploy preview channels](#how-to-deploy-preview-channels), below. @@ -166,7 +166,7 @@ Do either of the following: ## How to use `ChannelSearchKind` to ensure that a particular channel is used -When using `ChannelSearchKind`, here's how you can make sure that a certain preview browser channel is used, when you have multiple preview browser channels installed. +When using `ChannelSearchKind`, here's how you can make sure that a certain preview browser channel is used when you have multiple preview browser channels installed. In addition to reversing the channel search order, you can modify the set of release channels to include in the search, to provide further control over channel selection. The loader will search for channels on the device in the order specified by the channel search kind, but it will only consider channels that are in the specified set of release channels. @@ -391,7 +391,7 @@ These options are explained below. #### Option 1: Manually install preview channels on machines -Insider channels can be manually installed (either manually or through a deployed custom script) through the following enterprise links: +Preview channels can be manually installed (either manually or through a deployed custom script) through the following enterprise links: | Channel | Link | | --- | --- | diff --git a/microsoft-edge/webview2/index.md b/microsoft-edge/webview2/index.md index 78e57e2218..ab089c31a3 100644 --- a/microsoft-edge/webview2/index.md +++ b/microsoft-edge/webview2/index.md @@ -11,7 +11,7 @@ ms.date: 10/31/2023 --- # Introduction to Microsoft Edge WebView2 -The Microsoft Edge WebView2 control allows you to embed web technologies (HTML, CSS, and JavaScript) in your native apps. The WebView2 control uses [Microsoft Edge](https://www.microsoft.com/edge/download/insider) as the rendering engine to display the web content in native apps. +The Microsoft Edge WebView2 control allows you to embed web technologies (HTML, CSS, and JavaScript) in your native apps. The WebView2 control uses Microsoft Edge as the rendering engine to display the web content in native apps. With WebView2, you can embed web code in different parts of your native app, or build all of the native app within a single WebView2 instance. @@ -117,3 +117,6 @@ See also: developer.microsoft.com: * [Microsoft Edge WebView2](https://developer.microsoft.com/microsoft-edge/webview2) - initial introduction to WebView2 features at developer.microsoft.com. + +Microsoft.com: +* [Become a Microsoft Edge Insider](https://www.microsoft.com/en-us/edge/download/insider) - download the preview channels of Microsoft Edge (Canary, Dev, and Beta). diff --git a/microsoft-edge/webview2/samples/webview2browser.md b/microsoft-edge/webview2/samples/webview2browser.md index fd63510951..ce36d78406 100644 --- a/microsoft-edge/webview2/samples/webview2browser.md +++ b/microsoft-edge/webview2/samples/webview2browser.md @@ -39,7 +39,7 @@ This sample is built as a Win32 [Visual Studio 2019](https://visualstudio.micros ## Step 1: Install a preview channel of Microsoft Edge -* If not installed yet, install a [preview channel of Microsoft Edge](https://www.microsoft.com/edge/download/insider/) on a supported OS. +* If not installed yet, install a preview channel of Microsoft Edge on a supported operating system. To do this, go to [Become a Microsoft Edge Insider](https://www.microsoft.com/edge/download/insider/). From 7798b6502874abba9dccfdc9d5dc2833f836cfea Mon Sep 17 00:00:00 2001 From: Michael Hoffman Date: Wed, 24 Apr 2024 16:18:14 -0700 Subject: [PATCH 61/61] link more directly to 2 new articles --- microsoft-edge/webview2/concepts/developer-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microsoft-edge/webview2/concepts/developer-guide.md b/microsoft-edge/webview2/concepts/developer-guide.md index 6358fd7d7f..c9f2e863cd 100644 --- a/microsoft-edge/webview2/concepts/developer-guide.md +++ b/microsoft-edge/webview2/concepts/developer-guide.md @@ -25,7 +25,7 @@ If you use the Evergreen runtime, before running your WebView2 app, test whether When using the Evergreen WebView2 Runtime, the runtime updates automatically, so you must regularly run compatibility tests. To ensure that your WebView2 app will continue to work as expected, test your web content in the WebView2 control against the Microsoft Edge preview channels (Beta, Dev, or Canary). The preview channels are also called _Insider channels_. -The above guidance is similar to the guidance for web developers. See [Test your app for forward-compatibility](../concepts/distribution.md#test-your-app-for-forward-compatibility). +The above guidance is similar to the guidance for web developers. To test your app for forward-compatibility, see [Prerelease testing using preview channels](../how-to/prerelease-testing.md) and [Self-host by deploying preview channels](../how-to/self-hosting.md). To download the preview channels of Microsoft Edge, go to [Become a Microsoft Edge Insider](https://www.microsoft.com/edge/download/insider).