I am trying to initialize a WebView2 component in a Windows Forms using .Net4.8 getting the below error:
Microsoft.Web.WebView2.Core.WebView2RuntimeNotFoundException: 'Couldn't find a compatible Webview2 Runtime installation to host WebViews.'
FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
It happens on this line:
await PowerBi_web.EnsureCoreWebView2Async(await CoreWebView2Environment.CreateAsync(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "WebView2")));
What could be the problem ?