On my visual studio community 2022 I have this error on my uwp app on Design on MainPage.xaml

Luke Ferguson 46 Reputation points
2023-11-21T12:21:49.9766667+00:00

On my visual studio community 2022 I have this error on my uwp app on Design on MainPage.xaml

System.Exception
The app didn't start. (Exception from HRESULT: 0x8027025B)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.DesignTools.UwpSurfaceDesigner.SurfaceIsolation.UwpSurfaceProcess.<SafeCreateViewAsync>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.VisualStudio.DesignTools.UwpSurfaceDesigner.SurfaceIsolation.UwpSurfaceProcess.<SafeCreateViewAsync>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.DesignTools.UwpSurfaceDesigner.SurfaceIsolation.UwpSurfaceProcess.<Initialize>d__60.MoveNext()


Screenshot (69)

Screenshot (70)

How do i fix this.

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,619 questions
Universal Windows Platform (UWP)
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,607 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,168 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Junjie Zhu - MSFT 14,831 Reputation points Microsoft Vendor
    2023-11-22T02:04:46.56+00:00

    Hi @Luke Ferguson ,

    Welcome to Microsoft Q&A!

    It is recommended to restart Visual Studio or reload the project.

    Right-click the project, Unload project,

    Right-click the project again, Reload project.

    You can report this problem about Visual Studio through this link: https://developercommunity.visualstudio.com/VisualStudio/report

    Thank you.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. C CB 0 Reputation points
    2024-03-18T09:27:59.69+00:00

    Unload and reload does not solve the problem. I can build and debug run the app, just can't open .xaml. The error mentioned above will occur once try to open any .xaml in the solution.

    0 comments No comments