Why does Live Preview not work on my VS 2022 maui project

CFos 41 Reputation points
2023-01-10T00:28:12.443+00:00

Hi,
I am using VS 2022 and have a .NET MAUI project. The issue is that Live Preview doesn't seem to work. I watched the video here: https://www.youtube.com/watch?v=nEOvX3YKw_E

However, I get the error shown below and I don't have the debug menu at the top of the running title bar as shown in the other screenshot.  

277645-image.png

277624-image.png

How do I get this to work?
Thanks,
Clint

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
4,084 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
1,071 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Anna Xiu-MSFT 30,966 Reputation points Microsoft External Staff
    2023-01-10T08:14:45.527+00:00

    Hi @CFos ,

    Welcome to Microsoft Q&A!

    Are you using the latest version of VS2022? Please update your VS2022 to the latest version through Visual Studio Installer.

    Then, go to Debug > Options > XAML Hot Reload and make sure that the “Enable XAML Hot Reload” option is selected.

    If it persists, I suppose it may be a known issue: https://developercommunity.visualstudio.com/t/NET-MAUI-Hot-ReloadXaml-Live-Preview-n/10198694?entry=problem&q=XAML+live+preview+not+working

    You can also vote and add your comment in that ticket.

    Sincerely,

    Anna


    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][1] to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. CFos 41 Reputation points
    2023-01-12T16:37:21.57+00:00

    Thanks for the reply! I upgraded to the latest VS2022 ( had 17.4.1 and updated to 17.4.3) but it still shows the same issues. Hot Reload is enabled as shown below. Screenshots taken when debugging MAUI app.

    User's image

    User's image

    Thanks,

    Clint


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.