Library:WebView2
| Vendor | Microsoft |
|---|---|
| Website | https://learn.microsoft.com/microsoft-edge/webview2/ |
| On this wiki | Facts · Code · Notes · Topics |
Microsoft Edge WebView2 embeds the Edge (Chromium) engine in Windows apps; the app ships only WebView2Loader.dll (or links it statically) and relies on a shared Evergreen runtime, or a bundled Fixed Version runtime, whose version is in the registry.
Overview
WebView2 is the Win32/.NET/WinUI control that hosts Chromium-based Edge. Unlike Library:Chromium Embedded Framework, the browser engine is not in the app: it is a separate runtime (msedgewebview2.exe and msedge DLLs) that the app finds at run time. In a reverse-engineering target look for WebView2Loader.dll, the exports CreateCoreWebView2Environment, CreateCoreWebView2EnvironmentWithOptions and GetAvailableCoreWebView2BrowserVersionString, or .NET assemblies Microsoft.Web.WebView2.Core.dll, Microsoft.Web.WebView2.WinForms.dll, Microsoft.Web.WebView2.Wpf.dll.
Files an app ships
Per Microsoft's distribution page, WebView2Loader code is either statically linked (WebView2Loader.lib) or shipped as an architecture-specific WebView2Loader.dll; managed apps carry runtimes\win-x86|win-x64|win-arm64\native\WebView2Loader.dll.
Finding the runtime
See Fact:WebView2/identification/Runtime registry location. Evergreen: one shared runtime installed per machine or per user. Fixed Version: the app bundles a runtime folder (over 250 MB) and passes its path as browserExecutableFolder (or env var WEBVIEW2_BROWSER_EXECUTABLE_FOLDER); the folder contains msedgewebview2.exe. Fixed Version does not use the registry key.
Useful environment variables and flags
WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS: extra Chromium switches for a development run, for example--remote-debugging-port=9222(flag listed in the WebView2 browser flags page) to attach DevTools to a running app; elevated apps ignore flags from the environment.WEBVIEW2_BROWSER_EXECUTABLE_FOLDER: runtime folder override.WEBVIEW2_USER_DATA_FOLDER: Unverified here (user data folder holds cookies, local storage and cache of the app's web content; read Microsoft's user-data-folder page).
Process model
One browser process per user data folder plus renderer, GPU and utility processes, all msedgewebview2.exe (process model page). Several apps may share a folder.
Pitfalls
- The WebView2 loader and the engine are separate: the DLL in the app folder tells you nothing about the engine version; read the runtime registry value.
- Unverified: the SDK NuGet package is Microsoft.Web.WebView2 and its headers (WebView2.h) list the COM interfaces ICoreWebView2*.
Code & repositories
- https://github.com/MicrosoftEdge/WebView2Samples (MIT)
- Documentation: learn.microsoft.com microsoft-edge/webview2 concepts distribution, webview-features-flags, process-model
- https://github.com/MicrosoftEdge/WebView2Samples @
a6a092b7226347c243677fa6df6b2cbef3dc7228· license: MIT (declared by the contributor; GitHub's detector did not recognize a license file)
Official WebView2 samples including deployment samples.
Tested on: source read, not run: README read only · checked 2026-10-18; last activity 2026-10-14