How to bring WebView2 to Visual Studio 2019 WPF Project

Hello hoping someone here has done this or can point me in the right direction…

I’m trying to add WebView2 to my project. this control would then navigate to a SharePoint Online Wiki.
with the build-in control it’s using I think IE 11 so I get javascript prompts. so looking for a way to use WebView2.

have a blessed day

Get started with WebView2 in WPF apps - Microsoft Edge Development | Microsoft Docs

You will need to download the NuGet package directly: NuGet Gallery | Microsoft.Web.WebView2 1.0.1010-prerelease

nupkg files are just ZIPs so you can rename it to a ZIP and grab the files from there.

Then you should be able to load the .NET assemblies with Add-Type


You’ll also likely need the WebView2Loader.dll extracted as well.


Once all that is loaded, you should be able to use it in PowerShell similar to how it is described in the documentation.