MacOS更新后Visual Studio构建.NET MAUI iOS项目模拟器运行时缺失如何修复?
修复MacOS更新后.NET MAUI iOS项目构建失败问题
报错信息:
The operation couldn’t be completed. Failed to locate any simulator runtime matching options: { BuildVersionString = 21E210; Platforms = ( "com.apple.platform.iphonesimulator" ); VersionString = "17.4"; }
修复步骤:
- 打开Mac上的Xcode,点击顶部菜单栏的
Xcode->Settings(或按下快捷键,) - 切换到
Platforms标签页,找到iOS 17.4 Simulator Runtime - 点击右侧的
Install按钮,等待下载安装完成 - 安装完成后,重启Windows端的Visual Studio和Mac上的配对代理服务,重新构建项目
备选方案(若找不到iOS 17.4选项):
- 打开Xcode的
Settings->Locations,确认Command Line Tools选择的是当前最新版本的Xcode - 若Xcode版本过低,在Mac App Store更新Xcode到支持iOS 17.4的版本(如Xcode 15.3),再回到
Platforms标签页安装对应模拟器运行时 - 也可在Mac终端执行以下命令,确保Xcode命令行工具路径正确:
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
内容的提问来源于stack exchange,提问作者Rafael
相关产品推荐
相关产品推荐

