다음을 통해 공유


CoreWebView2Environment.GetAvailableBrowserVersionString Method

Definition

Overloads

GetAvailableBrowserVersionString(String)

Gets the browser version info including channel name if it is not the stable channel or WebView2 Runtime.

GetAvailableBrowserVersionString(String, CoreWebView2EnvironmentOptions)

Gets the browser version info including channel name if it is not the stable channel or WebView2 Runtime.

GetAvailableBrowserVersionString(String)

Gets the browser version info including channel name if it is not the stable channel or WebView2 Runtime.

public static string GetAvailableBrowserVersionString (string browserExecutableFolder = default);
public static string GetAvailableBrowserVersionString (string browserExecutableFolder);
static member GetAvailableBrowserVersionString : string -> string
Public Shared Function GetAvailableBrowserVersionString (Optional browserExecutableFolder As String = Nothing) As String
Public Shared Function GetAvailableBrowserVersionString (browserExecutableFolder As String) As String

Parameters

browserExecutableFolder
String

The relative path to the folder that contains the WebView2 Runtime.

Returns

Exceptions

WebView2 Runtime installation is missing.

Applies to

GetAvailableBrowserVersionString(String, CoreWebView2EnvironmentOptions)

Gets the browser version info including channel name if it is not the stable channel or WebView2 Runtime.

public static string GetAvailableBrowserVersionString (string browserExecutableFolder = default, Microsoft.Web.WebView2.Core.CoreWebView2EnvironmentOptions environmentOptions = default);
static member GetAvailableBrowserVersionString : string * Microsoft.Web.WebView2.Core.CoreWebView2EnvironmentOptions -> string
Public Shared Function GetAvailableBrowserVersionString (Optional browserExecutableFolder As String = Nothing, Optional environmentOptions As CoreWebView2EnvironmentOptions = Nothing) As String

Parameters

browserExecutableFolder
String

The relative path to the folder that contains the WebView2 Runtime.

environmentOptions
CoreWebView2EnvironmentOptions

The environment options used to create the environment.

Returns

Exceptions

WebView2 Runtime installation is missing.

Remarks

Browser version info includes channel name if it is not the WebView2 Runtime. Channel names are Beta, Dev, and Canary. The format of the return string matches the format of BrowserVersionString. If an override exists for BrowserExecutableFolder, ReleaseChannels, or ChannelSearchKind, the override is used. The presence of an override can result in a different channel used than the one expected based on the environment options object. BrowserExecutableFolder takes precedence over the other options. See Microsoft.Web.WebView2.Core.CoreWebView2Environment.CreateCoreWebView2EnvironmentWithOptions(System.String,System.String,Microsoft.Web.WebView2.Core.Raw.ICoreWebView2EnvironmentOptions,Microsoft.Web.WebView2.Core.Raw.ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler) for more details on overrides. If an override is not specified, then the parameters passed to GetAvailableBrowserVersionString are used. The method fails if the loader is unable to find an installed WebView2 Runtime or non-stable Microsoft Edge installation.

Applies to