Evergreen Webview2
// Launch bootstrapper from https://go.microsoft.com/fwlink/p/?LinkId=2124703 var installer = new WebView2RuntimeInstaller(); await installer.InstallEvergreenRuntimeAsync();
Implementing WebView2 Evergreen requires an understanding of how the runtime initializes and how to handle environments where the runtime might be missing. Runtime Detection and Installation
: List WebView2 as an external dependency in your app manifest to ensure it is installed automatically by Windows during app setup. Are you building for a specific framework
Would you like to know more about Evergreen WebView2 or is there a specific aspect you'd like me to expand on? evergreen webview2
: To catch potential regressions before they reach your users, test your app against Microsoft Edge preview channels like Canary , Dev , or Beta . Distribution Options
: On compatible Windows versions, the WebView2 binaries are hard-linked with Microsoft Edge binaries when they match versions, further optimizing memory and disk usage Microsoft Learn Implementation Best Practices Availability Check : Always programmatically verify if the Evergreen Runtime is installed before initializing your application’s web control Microsoft Learn Update Handling
While Evergreen is recommended, it is important to understand the alternative: . Evergreen WebView2 Fixed Version WebView2 Updates Automatic, silent updates Manual, controlled by developer Size Small app size, shared runtime Larger app size (bundled) Security Always up-to-date Requires manual patching Compatibility Best for modern apps Best for locked-down or offline apps // Launch bootstrapper from https://go
The benefits of Evergreen WebView2 include:
When implementing WebView2, you must choose how to distribute the runtime to your users. Microsoft offers two main models. 1. The Fixed Version Model
Multiple applications on a user's machine use the same shared runtime, saving disk space and memory. : To catch potential regressions before they reach
Web browsers are frequent targets for exploits. In a Fixed Version model, if a severe Chromium vulnerability is discovered, your application remains exposed until you compile, test, and distribute an emergency patch to all users. With Evergreen, Microsoft patches the vulnerability globally via Windows Update, securing your application automatically. Drastic Reduction in Installer Sizes
However, if your app supports older Windows environments or stripped-down enterprise deployment images, your installer should verify its presence. You can bundle the —a tiny 2MB executable provided by Microsoft—with your installer. If the installer detects the runtime is missing, the bootstrapper downloads and configures the latest shared components silently. Step 2: Code Initialization (C# Example)
Since Windows 10 (with recent updates) and Windows 11, the .
If you are writing a post or developing an app, keep these mechanics in mind:
Overall, Evergreen WebView2 offers an exciting opportunity for developers to build desktop applications using web technologies, with the benefits of a seamless, evergreen browser integration.