Run .NET MAUI apps with Visual Studio for Mac

VS for Mac 17.0 Preview version is not yet supporting MAUI applications. But you can run them on macOS too, but you will need a terminal window for it!

MAUI projects can not be set as a runnable project (yet)
.NET 6 Xamarin and MAUl projects are not supported with this version of Visual Studio. The included target frameworks are not supported: net6.0-android|net6.0-ios|net6.0-maccatalyst

If you are not familiar, how to set up your environment to start developing with .NET newest technology named MAUI, then read this article by me:

Build and run on macOS

Open up a terminal, and navigate next to your .sln file. Give out the following command:

dotnet build YourSolutionName -t:Run -f net6.0-maccatalyst

This will run your application on macOS. If you wish, you can change the last parameter to net6.0-android or net6.0-ios too.

This content has 2 years. Some of the information in this post may be out of date or no longer work. Please, read this page keeping its age in your mind.

4 thoughts on “Run .NET MAUI apps with Visual Studio for Mac”

  1. Andras,

    This is something the VS for Mac team did on purpose. In Preview 6 if I modified the project file to only target .net6.0-maccatalyst I could run a Maui project and debug on my Mac. Since preview 7 came out it no longer works, yes I can do it from the terminal as you suggest, but you cannot debug.

  2. Hi,
    I don’t know if you have or had the same issue than me.
    When I build and run the default template app it works fine.
    But when I modify the code behind c# (i.e.: MainPage.xaml.cs) my changes are not taking into account, event when cleaning, rebuilding or restarting VS.
    Any thoughts?

    • Hey Pierre!

      Make sure that you are builing the same project where are you making changes in the code.
      Delete the bin / obj directories by hand, restart VS.

      It might help for you


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.