0

I'm currently trying to build an UWP WebView app for XBOX using the source URL of my web page. On chrome and edge browser all the UI are working as expected but when I run it on XBOX I'm facing a lot of UI issues.

Is there anyway that can be used to debug the XBOX UWP WebView such that we can make some changes while the app is running on Local Machine.

So that the same changes can be done in my stylings.

I'm building the UWP app using x64.

Currently I'm using Visual Studio 2022 for creating the UWP app using C#.

Thanks for your help. Happy coding.

  • Not sure if you can replace WebView with WebView2, you can have a try. – jerry Jul 05 '23 at 10:29
  • @jerry, if i change from webview to webview2 are there any other changes that has to be done for using the debug mode? – Tharun Koti Jul 05 '23 at 13:35
  • The debug is enable by default by using Webview2, you can use the debug tool the same as the edge browser, nothing need to done. – jerry Jul 06 '23 at 08:26
  • Hi I'm trying to create an WebView2 UWP when I follow the steps that are mentioned in the documentation. I'm getting the errors that has been mentioned in this forum. Error: XDG0008 The name "WebView2" does not exist in the namespace "using:Microsoft.UI.Xaml.Controls". XLS0414 The type 'controls:WebView2' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. Warning: Microsoft.UI.Xaml nuget package requires TargetPlatformVersion >= 10.0.18362.0 (current project is 17763) Thank you. – Tharun Koti Jul 06 '23 at 12:34
  • You have to change your UWP project TargetPlatformVersion. Right click the project -> Properties -> Application ->Target version – jerry Jul 07 '23 at 04:40

1 Answers1

1

Currently the Webview2 control is only available on Xbox in preview. You need to have added a special nuget package, which also has to be deployed to the xbox you are using. There are a lot of steps for getting debug to work. You have to use Edge not Chrome on your pc.

Webview2 is the only way I know to be able to use debug. I am fairly certain you cannot debug with webview control.

john-g
  • 874
  • 6
  • 14
  • fwiw I am currently working on a project using the preview version of the Webview2 control on Xbox – john-g Jul 17 '23 at 19:09
  • When I try to run the webview2 on XBOX i'm getting a screen saying "supported edge tools are not installed please install to proceed", have you got this issue when you tried to run the .sln on real device using "Remote Machine" method. – Tharun Koti Jul 18 '23 at 05:04
  • Yes you need to install a special nuget package that includes the webview2 preview – john-g Jul 18 '23 at 17:32