releaseChannels property
Sets the releaseChannels, which is a mask of one or more EnvironmentReleaseChannels indicating which channels environment creation should search for.
OR operation(s) can be applied to multiple EnvironmentReleaseChannels to create a mask. The default value is a a mask of all the channels. By default, environment creation searches for channels from most to least stable, using the first channel found on the device. When releaseChannels is provided, environment creation will only search for the channels specified in the set. Set channelSearchKind to EnvironmentChannelSearchKind.LEAST_STABLE to reverse the search order so environment creation searches for least stable build first. See EnvironmentReleaseChannels for descriptions of each channel.
The PlatformWebViewEnvironment creation will fails with HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)
if environment creation is unable to find any channel from the EnvironmentReleaseChannels installed on the device.
Use PlatformWebViewEnvironment.getAvailableVersion to verify which channel is used when this option is set.
Examples:
| ReleaseChannels | Channel Search Kind: Most Stable (default) | Channel Search Kind: Least Stable |
|---|---|---|
| EnvironmentReleaseChannels.BETA | EnvironmentReleaseChannels.STABLE | WebView2 Runtime -> Beta |
| EnvironmentReleaseChannels.CANARY | EnvironmentReleaseChannels.DEV | EnvironmentReleaseChannels.BETA |
| EnvironmentReleaseChannels.CANARY | Canary | Canary |
| EnvironmentReleaseChannels.BETA | EnvironmentReleaseChannels.CANARY | EnvironmentReleaseChannels.STABLE |
If both browserExecutableFolder and releaseChannels are provided, the browserExecutableFolder takes precedence,
regardless of whether or not the channel of browserExecutableFolder is included in the releaseChannels.
releaseChannels can be overridden by the corresponding registry override EnvironmentReleaseChannels or the environment
variable WEBVIEW2_RELEASE_CHANNELS. Set the value to a comma-separated string of integers, which map to
the following release channel values: Stable (0), Beta (1), Dev (2), and Canary (3).
For example, the values "0,2" and "2,0" indicate that environment creation should only search for
Dev channel and the WebView2 Runtime, using the order indicated by channelSearchKind.
PlatformWebViewEnvironment creation attempts to interpret each integer and treats any invalid entry as Stable channel.
Officially Supported Platforms/Implementations:
- Windows WebView2 1.0.2478.35+ (Official API - ICoreWebView2EnvironmentOptions7.put_ReleaseChannels)
Implementation
final EnvironmentReleaseChannels? releaseChannels;