Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This article explains how to add the WebView2 Runtime to a Validation OS image. WebView2 is an external component that you must download and integrate separately.
Prerequisites
Important
The Validation OS image must include the WebView OS Support feature (WebviewDependency.pkg).
Add the dependency by using one of these methods:
- Validation OS Image Builder: Select WebView OS Support when you configure the image.
- GenImage: Include
WebviewDependency.pkgin the feature configuration.
Choose a distribution method
Validation OS supports the WebView2 distribution methods shown in the following table.
| Distribution method | Support | Considerations |
|---|---|---|
| Fixed Version | Supported | Bundles a specific runtime version with the app. Recommended for predictable, offline Validation OS scenarios. |
| Evergreen Standalone Installer | Supported | Installs the packaged runtime without internet access. |
| Evergreen Bootstrapper | Supported | Requires internet access and downloads the latest available runtime. |
Basic WebView2 support was validated with version 138.0.3351.121 and later on x64 and Arm64 devices. Because Validation OS is minimal, some advanced WebView2 features might not be available.
Add a Fixed Version Runtime
Go to the Microsoft Edge WebView2 download page.
Select Fixed Version, and then select the required version and architecture.
Download the
.cabfile to the technician PC.Extract the package. Update the version, architecture, and paths in this example as needed:
expand "C:\Users\<user>\Downloads\Microsoft.WebView2.FixedVersionRuntime.139.0.3405.102.x64.cab" -F:* "C:\Users\<user>\Downloads\Microsoft.WebView2"
Use GenImage
Include the extracted runtime by using -AddedSW:
GenImage.cmd -PackagesList:<package-list> -AddedSW:"C:\Users\<user>\Downloads\Microsoft.WebView2\Microsoft.WebView2.FixedVersionRuntime.139.0.3405.102.x64" -Drivers:<driver-path>
To choose the destination in the image, also specify -AddedSWTargetDir:
GenImage.cmd -PackagesList:<package-list> -AddedSW:"C:\Users\<user>\Downloads\Microsoft.WebView2\Microsoft.WebView2.FixedVersionRuntime.139.0.3405.102.x64" -AddedSWTargetDir:"\WebView2Runtime" -Drivers:<driver-path>
Use Validation OS Image Builder
- Start Validation OS Image Builder.
- Under Optional Software, select the extracted WebView2 Runtime folder.
- Ensure that WebView OS Support is selected.
- Complete the image-build workflow.
Install an Evergreen Runtime
Download either the Evergreen Bootstrapper or Evergreen Standalone Installer from the Microsoft Edge WebView2 download page.
Boot the customized Validation OS image.
Run the installer. For unattended installation, use the applicable command:
Evergreen Bootstrapper:
MicrosoftEdgeWebview2Setup.exe /silent /installEvergreen Standalone Installer, x64 example:
MicrosoftEdgeWebView2RuntimeInstallerX64.exe /silent /install
Verify WebView2 support
- Boot the target device with the customized image.
- Verify that the runtime files are present in the expected location.
- For a Fixed Version Runtime, configure the app to use the runtime folder, such as
C:\WebView2Runtime. - Run the WebView2 app and validate the required scenarios.
For a sample, see the Validation OS SDK repository.
Troubleshooting
The app fails to initialize
Verify that the WebView OS Support feature was included in the image.
The runtime isn't found
Verify that the runtime files were copied to the image and that the app can access the configured runtime directory.