Xamarin.iOS:在 Visual Studio 2019 更新后无法运行 [英] Xamarin.iOS: Cannot run after Visual Studio 2019 Update

查看:40
本文介绍了Xamarin.iOS:在 Visual Studio 2019 更新后无法运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了一个奇怪的情况,

i'm facing a strange situation,

更新 Visual Studio 2019 后,我无法在 iOS 中运行该应用程序,当我尝试从连接到 Mac 的 Windows 计算机上运行时会发生这种情况.但是当我使用 Visual Studio for Mac 而不是 Windows 运行应用程序时,应用程序运行没有问题.

After Updating Visual Studio 2019, i'm not able to run the application in iOS, this happen when i try to run from a Windows Computer Linked to a Mac. But when i run the app using Visual Studio for Mac instead of windows, the app run without issues.

我查看了 Xcode 的 VS 配置和路径,结果是正确的 (/Applications/Xcode.app).Mac 上的路径存在并且可以访问.

I looked into VS configurations and paths for Xcode and are correct (/Applications/Xcode.app).The path on the Mac exists and are reachables.

我尝试了以下解决方案,但不起作用:打开模拟器 --> 点击顶部菜单 Simulator --> 点击 **Reset Content and Settings.... **同样在 Windows 和 Mac 中,架构都是 x86_64.

I tried the following solution, but it doesn't work: Open simulator -- > click on the top menu Simulator --> click on **Reset Content and Settings.... ** Also in both Windows and Mac the Architectures are x86_64.

Windows 计算机:Visual Studio 2019 专业版 16.3.7Xamarin.iOS 和 Xamarin.Mac SDK - 13.4.0.2 (e37549b)

Windows Computer: Visual Studio 2019 Professional Version 16.3.7 Xamarin.iOS and Xamarin.Mac SDK - 13.4.0.2 (e37549b)

麦克:Visual Studio 2019 Enterprise for Mac 版本 8.3.5(内部版本 13)Xcode 11.2 (11B52)Xamarin.iOS 和 Xamarin.Mac SDK - 13.4.0.2 (e37549bc)

Mac: Visual Studio 2019 Enterprise for Mac Version 8.3.5 (build 13) Xcode 11.2 (11B52) Xamarin.iOS and Xamarin.Mac SDK - 13.4.0.2 (e37549bc)

VS 在 Windows 上的输出:输出控制台:该应用程序已终止.启动失败.应用程序AppName"无法在iPhone 11 iOS 13.2"上启动.错误:错误 HE0042:无法在设备iOS 13.2 (17B84) - iPhone 11"上启动应用程序PackageName":打开PackageName"的请求失败.请查看日志以获取更多详细信息.应用已终止.

The ouput for VS on Windows: Output Console: The app has been terminated. Launch failed. The app 'AppName' could not be launched on 'iPhone 11 iOS 13.2'. Error: error HE0042: Could not launch the app 'PackageName' on the device 'iOS 13.2 (17B84) - iPhone 11': The request to open "PackageName" failed.. Please check the logs for more details. The app has been terminated.

构建输出:

Using Xcode 11.2 found in /Applications/Xcode.app/Contents/Developer
Xamarin.Hosting: Xamarin.Hosting
Xamarin.Hosting:     Version: 3064e2c463 (d16-3)
Xamarin.Hosting:     Xcode: /Applications/Xcode.app
Xamarin.Hosting:     Xcode Version: 11.2
Xamarin.Hosting:     Verbosity: 1
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/DVTFoundation
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/SharedFrameworks/DVTiPhoneSimulatorRemoteClient.framework/DVTiPhoneSimulatorRemoteClient
Xamarin.Hosting: Loaded /Library/Developer/PrivateFrameworks/CoreSimulator.framework/CoreSimulator
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/SharedFrameworks/DTDeviceKitBase.framework/DTDeviceKitBase
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/DVTKit
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/SharedFrameworks/DTDeviceKit.framework/DTDeviceKit
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/SharedFrameworks/DTXConnectionServices.framework/DTXConnectionServices
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/SharedFrameworks/DVTSourceControl.framework/DVTSourceControl
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/SharedFrameworks/DVTServices.framework/DVTServices
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/SharedFrameworks/DVTPortal.framework/DVTPortal
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/SharedFrameworks/DVTDocumentation.framework/DVTDocumentation
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/SharedFrameworks/DVTAnalyticsClient.framework/DVTAnalyticsClient
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/SharedFrameworks/DVTAnalytics.framework/DVTAnalytics
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/SourceKit
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/Frameworks/IDEFoundation.framework/IDEFoundation
Xamarin.Hosting: Loaded /Applications/Xcode.app/Contents/SharedFrameworks/IDEProducts.framework/IDEProducts
Xamarin.Hosting: Simulator watchdogs are not disabled for 'iOS 13.2 (17B84) - iPhone 11'.
Xamarin.Hosting: Shutting down simulator...
Xamarin.Hosting: Successfully disabled simulator watchdogs for 'iOS 13.2 (17B84) - iPhone 11'.
Xamarin.Hosting: Launching simulator application 'com.apple.iphonesimulator'
Xamarin.Hosting: Booting iPhone 11...
Xamarin.Hosting: Booted iPhone 11 successfully.
Xamarin.Hosting: No need to boot (already booted): iPhone 11
Xamarin.Hosting: Installing /Users/angyay0/Library/Caches/Xamarin/mtbs/builds/App.iOS/fb8bb79d47458ad099aab10c40ce7836/bin/iPhoneSimulator/Debug/App.iOS.app with Bundle Identifier PackageName on 'iOS 13.2 (17B84) - iPhone 11'...
Xamarin.Hosting: Installed 'PackageName' from /Users/angyay0/Library/Caches/Xamarin/mtbs/builds/App.iOS/fb8bb79d47458ad099aab10c40ce7836/bin/iPhoneSimulator/Debug/App.iOS.app
Xamarin.Hosting: Could not find any potentially troublesome weak load commands.
Xamarin.Hosting: The bundle id PackageName was successfully installed.
Xamarin.Hosting: Creating shared memory for:
__XAMARIN_DEBUG_PORT__=59082
Xamarin.Hosting: Created shared memory id: 65536
Xamarin.Hosting: Mapped shared memory: 0x1091ff000 for key 301399 and id 65536
Xamarin.Hosting: Launching com.hebmex.sg on 'iOS 13.2 (17B84) - iPhone 11'
Xamarin.Hosting: Could not launch the app 'PackageName' on the device 'iOS 13.2 (17B84) - iPhone 11': The request to open "PackageName" failed., will try to reinstall the app
Xamarin.Hosting: Created shared memory token: 301399
Xamarin.Hosting: Installing /Users/angyay0/Library/Caches/Xamarin/mtbs/builds/App.iOS/fb8bb79d47458ad099aab10c40ce7836/bin/iPhoneSimulator/Debug/App.iOS.app with Bundle Identifier PackageName on 'iOS 13.2 (17B84) - iPhone 11'...
Xamarin.Hosting: Installed 'PackageName' from /Users/angyay0/Library/Caches/Xamarin/mtbs/buildsApp.iOS/fb8bb79d47458ad099aab10c40ce7836/bin/iPhoneSimulator/Debug/App.iOS.app
Xamarin.Hosting: Could not find any potentially troublesome weak load commands.

推荐答案

我终于解决了.

Windows 上的 VS 和 CoreSimulator.Framework 之间存在通信错误.

There´s a communication error between VS on Windows and CoreSimulator.Framework.

我运行以下命令从终端重新安装 CoreSimulator.Framework:

i ran the following commands to re-install CoreSimulator.Framework from Terminal:

sudo rm -Rf /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/*
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -runFirstLaunch

然后 Xamarin.iOS 项目的配置正在更改调试端口(新的),在执行模式上的 iOS 运行选项上配置设置为默认无后台获取.

Then the configurations for Xamarin.iOS project was changing the Debugging port (New one), Configure over the iOS Run Options on Execution Mode set as Default no Background Fetch.

我希望它可以帮助解决此问题的其他人.

I hope it helps to others with this issue.

这篇关于Xamarin.iOS:在 Visual Studio 2019 更新后无法运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆