Closed BenMakesGames closed 2 years ago
Hi @BenMakesGames , that's certainly unexpected. Can you confirm that you have Edge WebView2 installed? You can get it from https://developer.microsoft.com/microsoft-edge/webview2/ (use one of the "Evergreen" options).
I've got another MBB project going that works. I've been comparing the code trying to see what's different. made a few changes to the one created with dotnet new
, but none of the changes have worked yet.
tried reinstalling WebView2 anyway; no change
not sure what to do at this point. I've changed everything I can think of to match my existing MBB project, including many things I'm sure wouldn't matter.
I primarily use Rider, but I also tried opening the solution in VS 2019 to see if that would somehow help, but that hasn't. I've deleted bin
and obj
dirs, and re-ran nuget restore
...
I have other things I need to do today, and am on vacation next week. I'll have to revisit later.
Oh hold on, this sounds like #403 ! To work around that, you can add this to the Windows project CSPROJ file:
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.961.33" />
And that will bring in the updated WebView2 component, which apparently fixes the address invalid issue.
Can you try that and see if it works?
that didn't work on its own, but I played around, and discovered the following:
I'm not sure why # 2 works; maybe package caches, or not-quite-empty obj/bin dirs, or something.
anyway, I dunno if there's more scenarios that need testing, but it seems like, for me, I need to both add WebView2 and upgrade Xamarin packages to 5.0.
(sorry about the late reply; was on vaca!)
@BenMakesGames OK well that is very bizarre, then! I'm glad you got it working now. Ultimately the plan is to move this all to .NET MAUI, for which there is already a PR open that I need to review. Hopefully that will resolve many issues.
I'm trying to create a minimum project demonstrating another issue, but the command for creating new projects, found here: https://docs.microsoft.com/en-us/mobile-blazor-bindings/walkthroughs/build-first-hybrid-app isn't working: