Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.

Sample not working on Windows -- This article tells you how to resolve it #50

Open
Dotneteer opened this issue Jan 10, 2020 · 6 comments

Comments

@Dotneteer
Copy link

There are several issues in this site that mention the same problem (#1, #6, #42): it's not apparent how to get started with WebView in Windows. When you first try to run the samples, you get exception right from the WebWindow constructor.

All the resolved issues mention that you have to install Edge Beta from here https://www.microsoftedgeinsider.com/en-us/. Well, this is just a part of the solution.

I suggest to add this information to README:

Running WebWindow on Windows has these prerequisites, as of this writing:

  1. Edge Beta, as WebWindow uses the new Chromium-based Edge via webview2
  2. Microsoft Visual C++ 2015-2019 Redistributable

Those developers who use Visual Studio 2019 for .NET desktop development without the Desktop development with C++ workload installed, will still get the WebWindow constructor exception.

Follow these steps to run samples on your Windows machine:

  1. If you've installed Visual Studio 2019 on your computer, ensure that the Desktop development with C++ workload installed.
  2. Altentatively, if you do not want to install that workload, install Microsoft Visual C++ 2015-2019 Redistributable (x86: https://aka.ms/vs/16/release/vc_redist.x86.exe, x64: https://aka.ms/vs/16/release/vc_redist.x64.exe)
  3. Install Edge Beta (https://www.microsoftedgeinsider.com/en-us/.)

Now, the samples should work when running them from Visual Studio 2019/.NET CLI

@Dotneteer Dotneteer changed the title Sample not working on Windows -- This article tells yout how to resolve it Sample not working on Windows -- This article tells you how to resolve it Jan 10, 2020
@benwurth
Copy link

This fixed my problem with Visual Studio, but not when I use Visual Studio Code on Windows.

@eivarin
Copy link

eivarin commented May 26, 2020

Hey this is incorrect... The Edge Beta no longer has the webview 2 runtime.
Please change it to the dev version or the cannary version. i explain why in #109

This issue should be pinned as it looks like it is essential for newcomers to this library

@marcvannieuwenhuijzen
Copy link

I just followed these instructions (download Edge Dev and install the Microsoft Visual C++ 2015-2019 Redistributable). Restarted and I am still getting the same error.

@eivarin
Copy link

eivarin commented Oct 26, 2020

@marcvannieuwenhuijzen can you post a print of the error?

@milkotv
Copy link

milkotv commented Nov 24, 2020

Hope this helps finding a resolution on Windows 7 Enterprise, SP1

image

image

image

image

image

image

@hexck
Copy link

hexck commented Jul 19, 2021

Installed edge beta, no luck, still got the same issue.

System.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants