Visual studio xaml designer unhandled exception has occured winui3

Devesh Pal 6 Reputation points
2022-02-19T05:29:45.993+00:00

Hi, I have recently Installed Visual Studio 2022 and created a winui3 project from the template.
But Xaml designer is not showing and the following error is shown.

An unhandled exception has occured.

System.InvalidOperationException
The document failed to open.
   at Microsoft.VisualStudio.DesignTools.SurfaceDesigner.DesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor, CancellationToken cancelToken)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.IsolatedDesignerService.IsolatedDesignerView.<CreateDesignerViewInfo>d__32.MoveNext()

Neither reload button nor display platform control button is working.
Waiting for Answer...


New-dev0

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,375 questions
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. Sreeju Nair 12,536 Reputation points
    2022-02-19T05:48:21.323+00:00

    Is your Visual Studio installation updated to the latest version? Use check for updates and see whether there is an update?

    176026-image.png

    Also you can refer the XAMARIN logs, see the xamarin option just above the check for updates button.


  2. Castorix31 86,501 Reputation points
    2022-02-19T07:10:00.78+00:00

    There is no XAML Designer in WinUI 3 :

    Discussion: WinUI 3.0 XAML Designer #5917


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.