Search code examples
visual-studio-extensionswebview2

How can I get WebView2 to work in my Visual Studio Extension


I have an extension project, where I have a tool window - this then opens a Web Browser, and navigates to some url, the problem is, that the site I'm navigating to, requires us to login, with google or other account, but due to us not being able to use the WebView2 Control - it states that the Web Browser is not secure.

Wondering if WebView2 would solve my issue above, or not, and if it is possible to embed WebView2 into my vs Extension at all?

I tried using WebView2 and installing it through nuget - it keeps on rolling back as it seems it cannot be installed?


Solution

  • VS extension is based on .NET framework, if the package is based on .Net Core or Unified .Net, then it will be impossible to install on the extension project.

    Please check the introduction page of that package on nuget gallery(I didn't find the same name package on nuget gallery, are you using abbreviation of that package?).