picoe / Eto

Cross platform GUI framework for desktop and mobile applications in .NET
Other
3.68k stars 334 forks source link

ETO WebView2 Revit Falls Back to Webview #2273

Open brandon-solemma opened 2 years ago

brandon-solemma commented 2 years ago

ETO + WebView2 + Revit doesn't load not and falls back to WebView instead of WebView2. When testing a standalone ETO(v. 2.6)+ WebView2(v. 1.0.1245.22) application, it successfully creates the WebView2 window. Also this example of WebView2 + WPF + Revit is successful.

WebView2 does seem to be supported in Revit as an Add-in, however When running Eto.Wpf.Forms.Controls.WebView2Loader.Create(); outputs Could not Load file or assembly Microsoft.Web.WebView2.Wpf which we believe is the the reason in the Revit example WebView runs instead of WebView2 since it falls back given this exception. This is referenced in the try/catch of PR #1829 in Eto.Wpf/Platform.cs. Even though the WebView2 NuGet Package is installed.

Code that Demonstrates the Problem

ETO + WebView2 Works

Webview2 + WPF + Revit Works

ETO + WebView2 + Revit Doesn’t Work

Specifications

Related Issue

Related to issue #2271 , however this issue is specific to Revit

alfarok commented 7 months ago

@brandon-solemma Did you ever end up finding a solution to this? I believe Revit 2025 uses WebView2 but I am trying to find a solution that works for 2022-2025. Thanks!

EmptyBox-Design commented 7 months ago

@alfarok no we could not get this to work, and moved to another type of solution.