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.
2,844 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.
935 questions
{count} votes

5 answers

Sort by: Most helpful
  1. Karthikeyan Jagadeesan 5 Reputation points
    2023-01-13T13:48:55.9866667+00:00

    The same problem affects me as well.

    I have upgraded to version 17.4.4, but I am still having the same problem. The XAML live preview works just perfectly with.net6, but not with.net7. I have enabled all the parameters and options. but no use.

    1 person found this answer helpful.
    0 comments No comments

  2. baraa jebali 5 Reputation points
    2023-03-12T00:55:26.7766667+00:00

    i am using the vs 2022 v 17.5.1 and i have the same problem..

    1 person found this answer helpful.
    0 comments No comments

  3. Anna Xiu-MSFT 25,466 Reputation points Microsoft Vendor
    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

  4. 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


  5. Vittorio Leo 6 Reputation points
    2023-06-12T12:10:08.7833333+00:00

    Good evening to everyone, I'm having the problem with Visual studio enterprise Version 17.6.2. Anyone has solved it?

    0 comments No comments