错误 MT0117:无法在仅支持 64 位应用程序的模拟器上启动 32 位应用程序 (iPhone 6s)

error MT0117: Can't launch a 32-bit app on a simulator that only supports 64-bit apps (iPhone 6s)

在 PC 上使用 Xamarin.Forms、Visual Studio 2017,并 MacBook Air 构建移动应用程序 iOS。

昨天,我将Visual Studio版本更新到了15.3.5。我还更新了 MacBook Air(通过 VS for Mac)以获取最新版本的 iOS (11.0)。 我创建了一个新应用程序 (Xamarin.Forms) 只是为了测试更新,一切都按预期工作。

我尝试 运行 我之前开发的一个较旧的应用程序,但我无法 运行 它在 Mac。

我收到以下错误:

Launch failed. The app 'AppName.iOS' could not be launched on 'iPhone 6s iOS 11.0'. 
Error: error MT0117: Can't launch a 32-bit app on a simulator that only supports 64-bit apps (iPhone 6s). Please check the logs for more details.
The app has been terminated.

接下来,我将设备 (iPhone) 插入 Mac 并尝试 运行 将应用程序连接到设备。我能够 运行 应用程序,但我收到一条消息,通知我一旦更新设备的 iOS 应用程序将停止 运行ning(我没有更新设备上的 iOS)。

所以,问题是我该如何解决这个问题?这与我的应用程序或我正在使用的软件包有关吗?是否有我需要设置的设置?是否可以 运行 Mac 上的旧模​​拟器?

使用 Xcode 9 应该可以将模拟器安装回 iOS 8.1 - 至少 "Components" 选项卡在 Xcode 首选项中是这么说的.

我不经常使用模拟器,因为在我的公司,我们有几个测试设备以及我们支持的所有 iOS 版本,我更相信在实际硬件上进行测试而不是在模拟器上进行测试。

如果您将支持架构更改为 "i386 + x86_64" 或 "x86_64",应该可以解决您的问题。

您可以右键单击您的项目 -> 属性 -> iOS 构建 -> 将 "Supported Architectures" 更改为 "i386 + x86_64" 或 "x86_64"