Dotnet maui error when i restore my project NETSDK1139

Viewed 1043

When i run “dotnet restore” It shows me this error and I am using windows 10

NETSDK1139: The target platform identifier ios was not recognized.

1 Answers

Since maui is still in preview the best place where to look is the official repos, it has been reported in https://github.com/dotnet/net6-mobile-samples/issues/47 and https://github.com/dotnet/net6-mobile-samples/issues/67

you must create the EnableWorkloadResolver.sentinel file (as described in the README), or alternatively export MSBuildEnableWorkloadResolver=true for the same effect. So as mentioned in the linked issues, you either:

  • Follow the readme file to include the sentinel file required.
  • Or install the Android workload as well, it will include sentinel for you.
Related