Replies: 4 comments 1 reply
-
Thanks for the question @rcohn! @krschau Any ideas on why this might be? |
Beta Was this translation helpful? Give feedback.
-
I'm not sure. @rcohn, could you possibly attach a min-repro app I could take a look at? |
Beta Was this translation helpful? Give feedback.
-
Hi @krschau - I wish I could send you a demo showing the problem. However, I cannot provide even a vanilla demo that does not use DISABLE_XAML_GENERATED_MAIN because now WebView2 will not launch at all. Last week, I had no problem launching a WebView2 demo; now WebView2 is not launching its URL (Source="https://www.microsoft.com"). So, if you could give me any guidance as to why WebView2 would not launch, that would be appreciated. And then we can get back to my original question. The app is built as a WinUI3 desktop unpackaged app, using WindowsAppSDK 1.0. The demo is based on the WinUI3 Getting Started demo (https://docs.microsoft.com/en-us/microsoft-edge/webview2/get-started/winui), except I didn't need to install the Nuget Webview2 support. Couldn't attach the entire app sources, but I did attach MainWindow.xaml and MainWindows.xaml.cs. Please let me know if there's any other info I can provide. Thanks for your assistance. |
Beta Was this translation helpful? Give feedback.
-
@krschau Here is a minimal repro. It appears the minimal change to make it work for this repro is to change the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello -
I wanted to make sure only one instance of our WinUI3 desktop is running. So I used the technique that sets DISABLE_XAML_GENERATED_MAIN and the method show below using DispatcherQueueSynchronizationContext. However, when this is done, then WebView2 does not start up. Is there a way to configure the single-instance startup that supports WebView2?
Thank you.
Robert
(Sorry about the screen shot. The code markup in this forum flattens all the whitespace.)
Beta Was this translation helpful? Give feedback.
All reactions