Forum Discussion

chukcha's avatar
chukcha
Copper Contributor
Sep 10, 2020

C# and WebView2

Hi everyone,

has anybody tried this example

https://docs.microsoft.com/en-us/microsoft-edge/webview2/gettingstarted/winforms

?

I do not see control in Toolbox and also get "WebView2 could not be found (are you missing a using directive or an assembly reference?)" error.

 

I'm using:

  • Visual Studio Community 2019, v.16.7.3
  • .NET Framework 4.7.2
  • C# + WinForms
  • Microsoft.Web.WebView2, v.0.9.579
  • Microsoft Edge, v.87.0.635.0 canary

I also found this:

"This package is necessary for Win 32 C/C++ applications."

in NuGet description. Does it work with C#?

Thank you.

1 Reply

  • chukcha's avatar
    chukcha
    Copper Contributor

    I think, I found solution: update to a pre-release version.

    Write In Package Manager Console

    PM> Update-Package Microsoft.Web.WebView2 -Version 0.9.579-prerelease

    and restart Visual Studio.

Resources