2

I've created a new MAUI project and made no changes to this. I am not sure what's missing as I've installed the necessary things (Xcode, Cocoa Android) as part of the install process. How do I run or debug the app on MacOS?

The Debug command brings up a window in which to type the command.

Screenshot of debug menu dropdown

  • **1)** Run Xcode - it might need to install "Additional Components". Do this once, whenever installing or upgrading Xcode. **2)** What happens if you do menu Build / Build Solution? – ToolmakerSteve Jun 08 '22 at 18:40
  • Unfortunately it's still the same. It has always had no issue building, I just can't run or debug it at all – Omar Ebrahim Jun 08 '22 at 19:53
  • I'm surprised it is able to Build. First, reboot Mac. Then, See the upper-left, next to the hammer, where it says "Default > Default". That shouldn't be happening. Click on the first (left) "Default" - does it have other choices "Debug" and "Release"? If so, pick "Debug". Then on right "Default", pick a target (some simulator probably). If no choices are there, then something isn't installed correctly. I would uninstall VS Mac Preview, and install it again. Then Reboot again. – ToolmakerSteve Jun 08 '22 at 20:09
  • Nope, just default, no option for Debug or a target. I'll do a reinstall and see if that fixes it. This isn't an issue for Windows so I think it's likely a bad or incomplete install of VS Mac. – Omar Ebrahim Jun 08 '22 at 20:51
  • Could you try to double click on the item `MyMauiApp.sln` ? It is because you don't open the real solution file , it is just a folder and can't be debugging. – ColeX Jun 09 '22 at 03:08
  • Uninstalling VS Mac and reinstalling it after running Xcode seems to now work. I noticed this time that `MacOS Cocoa` appeared in the list of things to install, not the Xamarin one. – Omar Ebrahim Jun 09 '22 at 04:55

1 Answers1

3

From the comments on the question

  1. Uninstall VS Mac Preview
  2. Install full Xcode, not just the command line tools
  3. Run Xcode at least once
  4. Install VS Mac Preview again