.NET MAUI is in Preview. Visual Studio is in Preview. If you try to do it on a Mac it feels like every single line of code is in Preview. It isn’t even the real Visual Studio, it’s “Visual Studio for Mac”.
Developing a .NET MAUI project on a MacBook is pain. The project will suddenly stop building and you will not know why. We spent hours debugging to get it working on a Mac again, but even then it is inconsistent.
To get a consistent build I created an ALIAS to run the app.
alias fuck="cd ~/git/all-the-code/Sos.ClientApp && rm -rf obj bin && dotnet restore && dotnet restore && dotnet build -t:Run -f net6.0-maccatalyst"
This command navigates to the project, removes any generated files, restores not once but twice (trust me, I have to) and then builds the project.
It’s way slower than just building normally, but it works. Now I can go back to being happy and creating awesomeness 😄