The Developer’s Guide to WebView2: The Evergreen Embeddable Web Runtime

┌────────────────────────────────────────────────────────┐ │ Your Native Application │ │ (WPF, WinForms, WinUI, C++, Win32, .NET MAUI, etc.) │ └───────────────────────────┬────────────────────────────┘ │ Calls WebView2 SDK APIs ▼ ┌────────────────────────────────────────────────────────┐ │ Evergreen WebView2 Runtime │ │ (Maintained and auto-updated by Microsoft) │ └───────────────────────────┬────────────────────────────┘ │ Renders ▼ ┌────────────────────────────────────────────────────────┐ │ Web Content / Assets (HTML, CSS, JS, WASM) │ └────────────────────────────────────────────────────────┘

| Feature | Evergreen WebView2 | CEF (Chromium Embedded) | WebView (Windows Old) | |--------|-------------------|------------------------|------------------------| | Auto-updates | ✅ Built-in | ❌ You manage | ❌ None | | Installer size | ~0MB (runtime shared) | ~80MB+ per app | ~0MB (OS built-in) | | Chromium version | Latest (auto) | Fixed (you compile) | EdgeHTML (obsolete) | | Offline support | ❌ Needs internet | ✅ Full | ✅ Full | | Sandbox security | ✅ High | ✅ High | ❌ Low |

To address this, Microsoft recommends implementing the NewBrowserVersionAvailable event handler in your WebView2 applications. This event is triggered when a new version of the Evergreen runtime has been installed on the system but is not yet being used by the running application. The correct flow for this scenario is:

Your company sells a React/Vue/Blazor dashboard. Your “desktop app” is literally a 2MB wrapper that hosts the WebView2 and adds native taskbar integration, drag-and-drop for local files, and printing. Because you use Evergreen, your users never experience an “out-of-date browser” warning. It’s always fresh.

Microsoft automatically pushes updates to the runtime, keeping it aligned with the Stable Channel of the Microsoft Edge browser.

control that ensures your application always uses the most recent and secure version of the browser engine. Microsoft Developer Executive Summary In the Evergreen model, the WebView2 Runtime is

Evergreen is the recommended distribution mode for most developers. Microsoft encourages this approach across development scenarios because it allows applications to benefit from the latest security and platform fixes without per-app runtime management.

Your application installer doesn't need to bundle the entire Edge engine, making the download much smaller 1.2.2. How Evergreen WebView2 Works

WebView2 supports various development frameworks, including: Win32 C/C++ .NET (WPF and Windows Forms)

Microsoft Edge update workflows handle the updates for the Evergreen runtime. When a new version of Microsoft Edge stable channel is released, the Evergreen WebView2 Runtime updates alongside it. Forward Compatibility

Packaging a Fixed Version runtime adds over 150MB to your installer package. The Evergreen model utilizes a runtime already built into modern Windows operating systems, keeping your application installer incredibly lightweight. 2. Zero-Maintenance Security

WebView2 requires a folder to store browser data like cookies, cache, and local storage. Never let the runtime use the default application directory, as it often lacks write permissions. Explicitly map the UDF to a secure location like AppData.