Mincrosoft edge webview2 issue

Ajay Mutalikdesai 1 Reputation point
2020-12-03T09:11:37.17+00:00

Hi,

My thinclient version is 64 bit, so I have downloaded dev environment of Microsoft edge of 64 bit but it its installed in 32 bit folder. Below is code I used to initialize corewebview2 , there is not error but corewebview2 is still null.

var env = await CoreWebView2Environment.CreateAsync(@"C:\Program Files (x86)\Microsoft\EdgeWebView\Application\87.0.664.52", System.IO.Path.GetTempPath(),new CoreWebView2EnvironmentOptions("-incognito"));
await webBrowser1.EnsureCoreWebView2Async(env);

What could be issue? My dll version is 1.0.674 - prerelease. Dev environment version is 87.0.664.52.

Thanks,
Ajay

Microsoft Edge
Microsoft Edge
A Microsoft cross-platform web browser that provides privacy, learning, and accessibility tools.
2,238 questions
{count} votes

10 answers

Sort by: Most helpful
  1. Ajay Mutalikdesai 1 Reputation point
    2020-12-07T10:51:07.383+00:00

    Deepak,

    PFA the result below:

    45530-capture.png


  2. Ajay Mutalikdesai 1 Reputation point
    2020-12-08T07:01:33.847+00:00

    Deepak,

    So I will tell exactly what we are trying to do. Once our form is designed, we are creating object of this from in another code and then access webview2 object. I tried by referring webView2 (Suggested name) but still getting same error.


  3. Ajay Mutalikdesai 1 Reputation point
    2020-12-17T07:03:02.047+00:00

    Deepak,

    When I create new project as per suggestions its working, but we have a project where we create object of form and access webview2 reference. See the error we are getting in image attached.49008-webview2-error.jpg

    Initially the target framework was 2.0 (refer the image), so we changed to 4.7.2. and created a form and getting error as mentioned.

    49056-webview2-project-properties.jpg

    0 comments No comments

  4. Ajay Mutalikdesai 1 Reputation point
    2020-12-17T07:11:39.213+00:00

    Deepak,

    Also to mention, when we are creating new form as in image by clicking on "Add -> New Item".49033-new-form.jpg

    0 comments No comments

  5. Ajay Mutalikdesai 1 Reputation point
    2020-12-18T12:38:49.713+00:00

    Deepak,

    In our other .cs file we create object of this form and access webview2 reference.

    0 comments No comments