.NET Maui on mac using Jetbrains Rider Error

961 views Asked by At

This is with the template project for .net MAUI. After selecting new solution, i create a new .net MAUI project using the Jetbrains IDE interface. The default build is pixel 5, and this used to work, but is now displaying the error below.

0>Xamarin.Shared.targets(874,3): Error  : /usr/bin/xcrun exited with code 1
        
0>Xamarin.Shared.targets(874,3): Error  : actool exited with code 1
        
0>Assets.xcassets: Error  actool: The operation couldn’t be completed. Failed to locate any simulator runtime matching options: {
    BuildVersionString = 21A326;
    Platforms =     (
        "com.apple.platform.iphonesimulator"
    );
    VersionString = "17.0";
}

This is not for just one project, i'm getting this error on all my .net MAUI projects.

Before, I had more devices such as an iphone available but those options seem to have disappeared after creating a new project, or starting up old projects as well. I'm not sure where the error is coming from and i have no idea when or why it started, as it was working fine before.

Notably in visual studio this problem persists with the same errors; But only for the option "generic simulator". pixel 5 is also an option, but this time it gives a different error. In App.xaml.cs:

Microsoft.Maui.Controls.Xaml.XamlParseException
Position 9:37. Cannot assign property "Source": Property does not exist, or is not assignable, or mismatching type between value and property

I would be very grateful for any help, as this is for a grade and my teachers are unhelpful as they are of the opinion that owning a mac is on my own risk.

2

There are 2 answers

0
Hardik Patel On BEST ANSWER

I had same issue in Rider about 17.2 version

I had to install IOS 17.2 runtime in Xcode.

Download IOS 17.2 Runtime

  1. Under XCode -> Window -> Devices and Simulators -> Simulators -> "+" Plus To create a new simulator.
  2. Select OS Version -> In Drop down -> Click on Download more simuator runtimes
  3. Get "IOS 17.2"
0
AlexOB On

I had the same issue after updating to Rider 2023.3.1.

You have to start XCode. A dialog will appear that asks you to select your development platform. You should select iOS 17.X...(17.2 in my case) After that, the simulator will be installed. This might take a while. When it is installed, restart Rider and you should be able to build.