Microsoft Edge 2



Microsoft Edge virus is a term used to describe fake messages appearing on the hijacked web browser. Additionally, various cyber threats are hiding in online ads. Security specialists from bedynet.ru 4 warn to stay away from advertisements that offer to download security programs, install updates or inform about detected viruses. Microsoft Edge WebView2 Runtime enables the proper execution format, according to the necessities imposed by the building model of WebView2 applications. Also, it is a vital component for the.

-->

The Microsoft Edge WebView2 control enables you to embed web technologies (HTML, CSS, and JavaScript) in your native apps. The WebView2 control uses Microsoft Edge (Chromium) as the rendering engine to display the web content in native apps. With WebView2, you may embed web code in different parts of your native app. Build all of the native app within a single WebView instance. For information on how to start building a WebView2 app, navigate to Get Started.

Hybrid app approach

Developers must often decide between building a web app or a native app. The decision hinges on the trade-off between reach and power. Web apps allow for a broad reach. As a Web developer, you may reuse most of your code across different platforms. To access the all capabilities of a native platform, use a native app.

Hybrid apps allow developers to enjoy the best of both worlds. Hybrid app developers benefit from the following advantages.

  • The ubiquity and strength of the web platform.
  • The power and full capabilities of the native platform.

WebView2 benefits


Web ecosystem & skillset
Utilize the entire web platform, libraries, tooling, and talent that exists within the web ecosystem.


Rapid innovation
Web development allows for faster deployment and iteration.


Windows 7, 8, and 10 support
Support for a consistent user experience across Windows 7, Windows 8, and Windows 10.


Native capabilities
Access the full set of Native APIs.


Code-sharing
Add web code to your codebase allows for increased reuse across multiple platforms.


Microsoft support
Microsoft provides support and adds new feature requests when WebView2 releases at Generally Availability (GA).


Evergreen distribution
Rely on an up-to-date version of Chromium with regular platform updates and security patches.


Fixed
(coming soon) Choose to package the Chromium bits in your app.

Microsoft Edge 2


Incremental adoption
Add web components piece by piece to your app.

Getting started

To build and test your app using the WebView2 control, you need to have the WebView2 SDK installed. Select one of the following options to get started.

The WebView2 Samples repository contains samples that demonstrate all of the WebView2 SDK features and API usage patterns. As more features are added to the WebView2 SDK, the sample apps will be updated.

Supported platforms

A General Availability (GA) or Preview version is available on the following programming environments.

  • Win32 C/C++ (GA)
  • .NET Framework 4.6.2 or later
  • .NET Core 3.1 or later
  • .NET 5
  • WinUI 3.0 (Preview)

You may run WebView2 apps on the following versions of Windows.

  • Windows 10
  • Windows 8.1
  • Windows 7 **
  • Windows Server 2019
  • Windows Server 2016
  • Windows Server 2012
  • Windows Server 2012 R2
  • Windows Server 2008 R2 **

Important

** WebView2 support for Windows 7 and Windows Server 2008 R2 has the same support cycle as Microsoft Edge. For more information, navigate to Microsoft Edge supported Operating Systems.

Next steps

For more information on how to build and deploy WebView2 apps, review the conceptual documentation and how-to guides.

Concepts

How-To guides

Getting in touch with the Microsoft Edge WebView team

Share your feedback to help build richer WebView2 experiences. To submit feature requests or bugs, or search for known issues, navigate to the Microsoft Edge WebView feedback repo.

-->

When distributing your WebView2 app, ensure the backing web platform, the WebView2 Runtime, is present before the app starts. This article describes how you (the developer) install the WebView2 Runtime, and use the two distribution modes for your WebView2 app: Evergreen and Fixed Version.

Evergreen distribution mode

Note

The Evergreen distribution mode is recommended for most developers.

The Evergreen distribution mode ensures that your app is taking advantage of the latest features and security updates. It has the following characteristics.

  • The underlying web platform (WebView2 Runtime) updates automatically without additional effort from you.
  • All apps that use the Evergreen distribution mode use a shared copy of the Evergreen WebView2 Runtime, which saves disk space.

Understanding the WebView2 Runtime

The WebView2 Runtime is a redistributable runtime and serves as the backing web platform for WebView2 apps. The concept is similar to Visual C++ or the .NET Runtime for C++/.NET apps. The Runtime contains modified Microsoft Edge (Chromium) binaries that are fine-tuned and tested for apps. The Runtime does not appear as a user-visible browser upon installation. For example, a user does not have a browser desktop shortcut or start menu entry.

During development and testing, you may use either as the backing web platform.

  • The WebView2 Runtime
  • Any Insider (non-stable) Microsoft Edge (Chromium) browser channel

In production environments, you must ensure the Runtime is present on user devices before the app starts. The Microsoft Edge Stable channel is unavailable for WebView2 usage. The decision prevents apps from taking a dependency on the browser in production.

Do not take a dependency on the browser because:

  • Microsoft Edge (Chromium) is not guaranteed to be present on all user devices. For example, devices disconnected from Windows Update or not managed by Microsoft directly (a large portion of the Enterprise and EDU market) may not have the browser. Allowing you to distribute the WebView2 Runtime avoids taking a dependency on the browser as a pre-requisite for apps.
  • Browsers and apps have different use cases, and so taking a dependency on a browser may have unintended side-effects on your apps. For example, IT admins may version-control the browser for internal website compatibility. The WebView2 Runtime allows apps to stay evergreen while browser updates are being actively managed.
  • As opposed to the browser, the Runtime is developed and tested for app scenarios and in some cases may include bug fixes not yet available in the browser.

In the future, the Evergreen WebView2 Runtime plans to ship with future releases of Windows. Deploy the Runtime with your production app until the Runtime becomes more universally available.

Deploying the Evergreen WebView2 Runtime

Only one installation of the Evergreen WebView2 Runtime is needed for all Evergreen apps on the device. There are a number of tools available on the WebView2 Runtime download page. The following tools help you deploy the Evergreen Runtime.

  • WebView2 Runtime Bootstrapper is a tiny (approximately 2 MB) installer. WebView2 Runtime Bootstrapper downloads and installs the Evergreen Runtime from Microsoft servers that matches the user's device architecture.
  • Use a link to programmatically download the bootstrapper.
  • WebView2 Runtime Standalone Installer is a full installer that installs the Evergreen WebView2 Runtime in offline environments.

Currently, both the bootstrapper and standalone installer only support per-machine installs, which requires elevation. If an installer is run without elevation, the user is prompted to elevate permissions.

Use following workflows to ensure the Runtime is already installed before your app launches. You may adjust your workflow depending on your scenario. Sample code is available in the Samples repo.

Online-only deployment

If you have an online-only deployment scenario where users are assumed to have internet access, complete the following steps.

  1. During your app setup, ensure the Runtime is already installed. To verify, complete one of the following actions.
    • Inspect if the pv (REG_SZ) regkey exists and is not null or empty. Find pv (REG_SZ) at the following location.

      On 64-bit Windows

      On 32-bit Windows

    • Run GetAvailableCoreWebView2BrowserVersionString and ensure the versionInfo is NULL.

  2. If the Runtime is not installed, use the link to programmatically download the bootstrapper.
  3. Invoke the bootstrapper from an elevated process or command prompt with MicrosoftEdgeWebview2Setup.exe /silent /install for silent install.

The previous workflow has the following benefits.

  • Install the Runtime only when needed or when you are not required to package installers.
  • The bootstrapper automatically detects device architecture and installs the matching Runtime.
  • Install the Runtime silently.

You may also choose to package the bootstrapper with your app instead of programmatically downloading it on demand.

Offline deployment

If you have an offline deployment scenario where app deployment has to work entirely offline, complete the following steps.

  1. Download the standalone installer.

  2. Include the installer in your app installer or updater.

  3. During your app setup, ensure the Runtime is already installed. To verify, complete one of the following actions.

    • Inspect if the pv (REG_SZ) regkey exists and is not null or empty. Find pv (REG_SZ) at the following location.

      On 64-bit Windows

      On 32-bit Windows

    • Run GetAvailableCoreWebView2BrowserVersionString and ensure the versionInfo is NULL.

  4. If the Runtime is not installed, run the standalone installer. If you want to run a silent installation, either run the installer from an elevated process or copy and run the following command.

Stay compatible in Evergreen mode

The Web is constantly evolving. The Evergreen WebView2 Runtime is kept up to date to provide you with the latest features and security fixes. To ensure your app stays compatible with the web, you should set up testing infrastructure.

Non-stable Microsoft Edge channels (Beta/Dev/Canary) provide a sneak peek into what is coming next into WebView2 Runtime. Just like developing websites for Microsoft Edge, you should test your WebView2 app regularly. Test your WebView2 app against one of the non-stable channels, and update your app or report issues if issues arise. Typically Dev and Beta are the recommended channels. To help you decide which channel is right, navigate to Overview of the Microsoft Edge channels. You may download the non-stable Microsoft Edge channel on your test environment, and use regkey or environment variables to indicate the channel preference for your testing app. For more information, navigate to CreateCoreWebView2EnvironmentWithOptions. You may also use WebDriver to automate WebView2 testing.

Fixed Version distribution mode

For constrained environments with strict compatibility requirements, consider using the Fixed Version distribution mode. Choose and package a specific version of the WebView2 Runtime using the Fixed Version distribution mode. You may specify the timing of Runtime updates for your app. The Fixed Version distribution mode does not receive any automatic updates. Plan to update your app and the Runtime.

Note

The Fixed Version distribution mode was previously called bring-your-own.

To use the Fixed Version mode, complete the following actions

  1. Download the Fixed Version package.
  2. Decompress the package using command line expand {path to the package} -F:* {path to the destination folder} or with tools such as WinRAR. Avoid decompressing through the File Explorer as it may not generate the correct folder structure.
  3. Include the decompressed Fixed Version binaries in your project.
  4. Indicate the path to the Fixed Version binaries when creating the WebView2 environment.
    • For Win32 C/C++, you may create the environment using the CreateCoreWebView2EnvironmentWithOptions function. Use the browserExecutableFolder parameter to indicate the path to the folder containing msedgewebview2.exe.

    • For .NET, you may do either of the following options to specify the environment.

      Note

      You must specify the environment before the WebView2 Source property takes effect.

      • Set the CreationProperties (WPF/WinForms) property on the WebView2 element. Use the BrowserExecutableFolder member in the CoreWebView2CreationProperties (WPF/WinForms) class to indicate the path to the Fixed Version binaries.
      • Use EnsureCoreWebView2Async (WPF/WinForms) to specify the environment. Use the browserExecutableFolder parameter in CoreWebView2Environment.CreateAsync to indicate the path to the Fixed Version binaries.
  5. Package and ship the Fixed Version binaries with your app. Update the binaries as appropriate.

Known issues for Fixed Version

Microsoft Edge Update

Compared to the Evergreen Runtime, Fixed Version does not have an installation process, which causes Microsoft PlayReady to not work without modification. You may mitigate the problem by completing the following actions.

Microsoft Edge 23

  1. Locate the path where you deploy the Fixed Version package on the user's device, such as the following location.

  2. Run the following commands on the user's device.

  3. PlayReady should be working now on the user's device. In the Security tab of the Fixed Version folder, it should include permissions for ALL APPLICATION PACKAGES and ALL RESTRICTED APPLICATION PACKAGES.





Comments are closed.