3

I've installed Visual Studio 2022 for Mac and created a .NET MAUI project.

If I start debugging with the Android emulator selected, it starts as expected.

If I switch to an iOS simulator instead, the build works but I get an error saying:

"Can not execute [...]/net6.0-android/MauiSample1.dll. The selected execution mode is not supported for .NET projects."

Notice it says "net6.0-android" in the DLL path...

I tried removing the Android build target in the .csproj file...

<TargetFrameworks>net6.0-ios;net6.0-maccatalyst</TargetFrameworks>

...but that instead gives me a similar error saying:

"Can not execute [...]/net6.0-ios/iossimulator-x64/MauiSample1.exe. The selected execution mode is not supported for .NET projects."

I get a feeling there's something off with what it tries to deploy/start on the iOS simulator?

Screenshot showing iOS simulator is selected, error is at the bottom left:

Visual Studio 2022 for Mac screenshot

PS. Funny thing is, I was able to get the app deployed to the iOS simulator from Visual Studio 2022 on Windows, paired to the Mac over the network...

Ted Nyberg
  • 7,001
  • 7
  • 41
  • 72

1 Answers1

1

Installing Visual Studio for Mac 2022 version 17.4 (as of writing in Preview 4) solved it.

I guess this is why version 17.3 came with a warning about .NET MAUI development not being "officially supported"...

Ted Nyberg
  • 7,001
  • 7
  • 41
  • 72