xamarin .NET Maui on mac using Jetbrains Rider错误

ncgqoxb0  于 2024-01-04  发布在  .NET
关注(0)|答案(2)|浏览(161)

这是.net MAUI的模板项目。在选择新的解决方案后,我使用Jetbrains IDE界面创建了一个新的.net MAUI项目。默认构建为pixel 5,这曾经有效,但现在显示以下错误。

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";
}

字符串
这不仅仅是一个项目,我在所有的.net MAUI项目上都遇到了这个错误。
以前,我有更多的设备,如iPhone,但这些选项似乎已经消失后,创建一个新的项目,或启动旧项目以及.我不知道错误是从哪里来的,我不知道什么时候或为什么它开始,因为它之前工作正常.
值得注意的是,在Visual Studio中,此问题仍然存在相同的错误;但仅适用于选项“generic simulator”。pixel 5也是一个选项,但这次它给出了不同的错误。在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


我将非常感谢任何帮助,因为这是一个等级和我的老师是无益的,因为他们认为拥有一个mac是在我自己的风险。

8ftvxx2r

8ftvxx2r1#

我在更新到Rider 2023.3.1后遇到了同样的问题。
您必须启动XCode。将出现一个对话框,要求您选择开发平台。您应该选择iOS 17.X...(在我的情况下为17.2)之后,模拟器将被安装。这可能需要一段时间。当它被安装时,重新启动Rider,您应该能够构建。

hpxqektj

hpxqektj2#

我在Rider 17.2版本中遇到了同样的问题
我必须在Xcode中安装IOS 17.2运行时。
下载IOS 17.2
1.在XCode -> Window -> Devices and Simulators -> Simulators ->“+”Plus下创建一个新的模拟器。
1.选择操作系统版本->在下拉菜单->点击下载更多的simulator运行时
1.获取“IOS 17.2”

相关问题