Search code examples
c#.netvisual-studiomauivisual-studio-mac

[VS MAC]Updating to .NET 8 all of my Maui projects display Error NETSDK1139: The target platform identifier ios was not recognized


Yesterday I updated from .NET 7.0 to .NET 8.0 following my colleague doing so and having it work immediately. For myself however, on both my VS Mac and my VS Windows I get the error

Error NETSDK1139: The target platform identifier ios was not recognized.

enter image description here

(This error also appears in the android variant if set to ios as the deploy target)

The target frameworks are listed as net8.0-android;net8.0-ios;

enter image description here

I've all of the following~

  • Uninstalling all .NET SDKs and Workloads, as well as VS 2022
  • Reinstalling only VS 2022 and .NET 8 (.NET 6 and 7 being automatically installed with VS)
  • Running command line statements such as dotnet workload restore and install for maui, maui-ios and maui-android.
  • A brand new Maui project
  • I've also attempted to get maui-check working but it seems entirely busted at the moment with errors such as 'zsh: killed maui-check'.

It's also worth noting that~

  • When creating a new maui project .NET 8 is not an option, only .NETs 7 and 6
  • I don't have any simulators or devices appearing as deploy targets since updating.

enter image description here

  • My .NET core and runtimes are listed both in VS 2022 and when running command lines to check which are installed on the system.

enter image description here

I would really appreciate anyone's knowledge on this subject and especially anyone who has previously encountered and dealt with this.


Solution

  • I had the same issue and the following is what fixed it,

    • Make sure you have the preview feature on your Mac

    enter image description here