The Evergreen WebView2 Runtime is the recommended distribution model for embedding modern web content into Windows applications. Unlike traditional "Fixed Version" models that bundle a specific static engine, the Evergreen model uses a self-updating system maintained by Microsoft, ensuring your app always runs on the latest Chromium-based rendering engine. Core Architecture and Distribution
The Evergreen Runtime acts as a shared system component. In the Evergreen distribution mode, the runtime is not packaged directly with your application. Instead:
System Integration: It is pre-installed on Windows 11 and pushed to eligible Windows 10 devices through Microsoft 365 Apps.
Shared Footprint: Because multiple apps share a single Evergreen installation, it significantly reduces the disk footprint on the user's machine compared to bundling separate engines for each app.
Automated Maintenance: Microsoft manages the updates, delivering the latest security patches, bug fixes, and web standard updates (typically aligning with Microsoft Edge Stable channel releases). Performance and Security Advantages
Choosing Evergreen is often considered a "future-proofing" move for developers.
Security: Applications automatically receive the latest security improvements without requiring the developer to release a new version of the app.
Optimization: Newer versions of the runtime frequently address legacy issues like memory leaks and high CPU usage.
Feature Access: Developers can use the latest WebView2 APIs from the most recent SDK, knowing the underlying runtime will support them. Implementation Best Practices
While the Evergreen model simplifies maintenance, it introduces specific responsibilities for developers: Distribute your app and the WebView2 Runtime
The Evergreen WebView2 Runtime 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
Rendering Engine: Uses Microsoft Edge (Chromium-based) to render HTML, CSS, and JavaScript within native apps.
Process Sharing: WebView2 instances share browser, network, and GPU processes, which optimizes system resources.
Automatic Updates: The runtime is managed by the Microsoft Edge update service, requiring no manual intervention from developers once installed. Distribution & Deployment evergreen webview2
Developers typically ensure the runtime is present on client machines through several methods:
Evergreen Bootstrapper: A small (~2MB) executable that downloads the correct runtime architecture (x86, x64, or ARM64) on-demand.
Evergreen Standalone Installer: A full installer containing all binaries, suitable for offline deployment or strictly controlled environments.
Chain Installation: Runtimes can be "chained" into application installers using tools like WiX Burn Bundle or Visual Studio Installer Projects. Key Advantages
Security: Regular, automated updates minimize exposure to known vulnerabilities.
Efficiency: Reduces disk footprint by sharing one copy of the runtime across multiple apps on a single system.
Compatibility: Apps can use the latest WebView2 APIs from the current WebView2 SDK without repackaging the app. Maintenance & Troubleshooting
While automated, certain issues may arise requiring manual intervention:
Repairing: If an app fails to initialize (e.g., throwing a COMException), users can repair the runtime via the "Add or remove programs" menu in Windows.
Forward-Compatibility Testing: Microsoft recommends developers test their apps against Edge preview channels (Canary, Dev, or Beta) to ensure future runtime updates don't break existing functionality.
Detection: Apps should programmatically check for the runtime's existence using the GetAvailableBrowserVersionString method before attempting to initialize a WebView instance. Comparison at a Glance Evergreen Runtime (Recommended) Fixed Version Runtime Update Management Automatic via Microsoft Manual by Developer Disk Footprint Shared (Smaller) Per-app (Larger) Security Always current Developer responsibility Best For Most general applications Apps with strict compatibility needs
Evergreen webView2 runtime compatability issue? #2210 - GitHub
What is Evergreen WebView2?
Evergreen WebView2 is a runtime environment that allows developers to embed a modern web browser, specifically Microsoft Edge, into their desktop applications. This enables the use of web technologies such as HTML, CSS, and JavaScript to build desktop applications.
Key Features:
Interesting Review:
Here's an interesting review of Evergreen WebView2:
Pros:
Cons:
Use Cases:
Evergreen WebView2 is suitable for various use cases, including:
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.
Would you like to know more about Evergreen WebView2 or is there a specific aspect you'd like me to expand on?
In the context of modern Windows application development, the Evergreen WebView2 Runtime is the default and recommended distribution model for embedding web content into native apps. 🌐 What is Evergreen WebView2?
The "Evergreen" mode refers to a runtime that updates automatically via Microsoft Edge's update cycle. Unlike the "Fixed Version," which requires developers to package and manually update specific binaries with their app, the Evergreen version ensures:
Security: Users always have the latest patches without developer intervention. Evergreen : WebView2 is an "evergreen" technology, meaning
Efficiency: Multiple apps share a single runtime on the device, saving disk space.
Performance: On modern systems, binaries are hard-linked with Microsoft Edge to reduce memory footprint. 🛠️ Key Technical Concepts
If you are writing a post or developing an app, keep these mechanics in mind:
Distribution: You can deploy it using a tiny Evergreen Bootstrapper (which downloads the runtime on the fly) or an Evergreen Standalone Installer for offline environments.
Versioning: Your app's SDK version should be compatible with the runtime version. It is best practice to use feature detection (checking if an API exists) rather than assuming a specific version is present.
Initialization: To ensure a smooth experience, apps should programmatically check for the runtime's presence before attempting to load a WebView2 control.
Breaking Changes: While rare, automatic updates can occasionally cause issues. Developers are encouraged to test their apps against Microsoft Edge Preview channels (Beta, Dev, or Canary) to catch upcoming changes. ⚠️ Common Hurdles
Legacy Systems: Support for older operating systems like Windows 7 or Server 2012 R2 has ended, and newer evergreen versions may fail to install on these platforms.
Update Handling: When an update occurs while an app is running, the app continues using the old version until it is restarted or all WebView2 objects are released.
Uninstallation: Because many core Windows apps (like Teams) now rely on it, the WebView2 runtime often reinstalls itself if manually removed by a user.
Why was WebView2 re-installed after I uninstalled it? - Microsoft Q&A
WebView2.Environment.CreateAsync() checks for the existence of the runtime.118.0.2088.0).Microsoft Edge Update Service (similar to Google Update) polls Microsoft servers every few hours.119.0.2151.0), it downloads the delta in the background.When Microsoft introduced WebView2, they solved a major pain point for Windows developers: hosting web content inside a native application without the heavy baggage and security risks of the old WebBrowser control (which relied on Internet Explorer).
However, one term often confuses newcomers: Evergreen. ensuring zero downtime.
If you are building a Windows app with WebView2, understanding the "Evergreen" model is critical to deciding how your app will be distributed, updated, and maintained.
Microsoft continues to enhance Evergreen WebView2 with: