Open yannduran opened 5 years ago
Thanks, yes. We're looking into .NET support. We've got an issue open on our WebViewFeedback project. https://github.com/MicrosoftEdge/WebViewFeedback/issues/23
@yannduran - Since the reply wasn't quite clear:
webview2 doesn't support C# yet. https://docs.microsoft.com/en-us/microsoft-edge/hosting/webview2#supported-platforms
Developer preview is available for Win32 C++ on Windows 10, Windows 8.1, Windows 8, and Windows 7. In the future, we plan to support WebView2 on .NET, and XAML.
@yannduran @OranguTech
Yes, we do not currently support C# yet, but doing so is among our top priorities. After we release C# support, we plan to release a Sample Application in C#.
@pagoe-msft
Why is this issue closed? Until C# samples are released this issue has not been addressed. It should remain open until that happens.
Any update on a cross platform C# sample? (based on a console app not on wpf or winforms)
As of now the WebView2 control is not cross-platform. We can look into building a console app sample. I'd love to get a sense of what you're building and what you'd like to use WebVIew2 for.
I would really like to see a WPF sample actually. I should have specified that originally.
There is suppose to be .NET Core support, is that through WPF or is it possible to spawn a webview2 window from a .NET Core console app?
https://docs.microsoft.com/en-us/microsoft-edge/webview2/reference/dotnet/0-9-515-reference-webview2
@sondreb I too tried this a few days ago and go no success, so I fell back to normal .NET winforms and everything worked fine, so it appears to me at least that core support is not yet finished.
@yannduran - a WPF sample is now published in WebView2Samples @sondreb / @shawty - .NET Core should work with WinForms. What issues are you running into? This is likely a bug on our end that we'd like to fix right away.
@pagoe-msft I'm looking for a solution like "WebWindow", where I can cross-platform run a .NET Core app with logic, that hosts an HTTP endpoint that serves an web app UI. It shouldn't matter what the UI is, if it's JavaScript, Blazor, Angular, React, etc.
I'd like to avoid any dependency on Windows Forms. WebWindow is a good attempt, but that is just a proof-of-concept, would like for the WebView2 to support a scenario like the one I just described.
Then we (as an industry) can avoid distributing the Chromium and Node.JS runtime every time we build a desktop app with web technology. The Xbox Beta app recently migrated from Electron to React Native to reduce resource consumption (RAM).
@pagoe-msft - Following this (https://docs.microsoft.com/en-us/microsoft-edge/webview2/gettingstarted/winforms) I noticed that it also said:
Since I prefer core projects at the moment (I'm currently writing a book on Core with Packt) I opted for using Core, but no matter what I tried I could not get the WebView2 control to appear in the toolbox is VS19.
I'm on the VS19 Preview track, I installed the Canary Build for Edge, and no dice.
As soon as I switched over and tried the same instructions with regular .NET winforms, no problem, it all worked as expected.
I was actually going to report it as a different issue, I just forgot :-)
@pagoe-msft
Thanks for the heads up. Though I would have liked to, I can't use WebView2
while it requires Canary build for Edge.
@pagoe-msft Wanted to check if Webview2 provides support for accessibility - that lets screen readers like JAWS and NVDA recognize the rendered HTML elements?
I have to say that this sample application is profoundly complex. I know that is not what you want to hear, but I am stunned at the complexity of this technology.
@HoldenPCaulfield to be fair it's really not. Seriously :-) that is actually a quite simple application, they just perhaps try to do to much in the one sample.
If you want complex, take a look at the custom browser I started to write using it :-)
Could you please provide samples in C#, not just C++? I can't make use of C++ project as I (and no doubt MANY others) develop solely in C#.
Thanks!