Pro tip: In production, embed the bootstrapper as a resource or pre-download it on your server.
If the runtime is missing, EnsureCoreWebView2Async throws an exception. Handle it by downloading the bootstrapper:
// Notice: No path specified. The runtime will find the Evergreen runtime. var env = await CoreWebView2Environment.CreateAsync(); await webView.EnsureCoreWebView2Async(env); // Navigate to your local or remote app webView.CoreWebView2.Navigate("https://my-saas-dashboard.com"); evergreen webview2
Evergreen webView2 runtime compatability issue? #2210 - GitHub
The term "evergreen" in software refers to a product that updates itself automatically in the background, without user intervention or manual downloads. Your web browser, whether Chrome, Firefox, or Edge itself, is evergreen. It silently updates to the latest version, bringing new features, performance improvements, and—most importantly—security patches. Pro tip: In production, embed the bootstrapper as
C:\Program Files (x86)\Microsoft\EdgeWebView\Application\Version\
The WebView2 Runtime contains modified Microsoft Edge binaries that are fine-tuned and tested specifically for WebView2 applications. Once installed, it doesn't appear as a user-visible browser—there's no desktop shortcut or Start menu entry for the runtime itself. Instead, it operates quietly in the background, much like the Visual C++ or .NET runtimes, serving as a shared system component. The runtime will find the Evergreen runtime
CoreWebView2Environment? env = null; try
Be aware that the Evergreen mode, by design, does not allow you to specify a particular runtime version for your application. If your application requires strict version compatibility to function correctly (e.g., in a highly regulated industry or when embedded in specialized hardware), the Fixed Version distribution mode may be a more suitable choice.
Because the underlying browser engine updates independently of your application, defensive programming is essential to ensure long-term stability. 1. Handle Initialization Gracefully
The is Microsoft's recommended distribution mode for embedding web technologies into native applications. Unlike the "Fixed Version," the Evergreen runtime is shared across all applications on a device and updates automatically via Microsoft Edge, ensuring applications always have the latest security patches and features. Core Functionality & Architecture