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

查看:513
本文介绍了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.

我查看了VS配置和Xcode的路径,并且是正确的(/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.

我尝试了以下解决方案,但是它不起作用: 打开模拟器->单击顶部菜单模拟器->单击**重置内容和设置....** 同样在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.7 Xamarin.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)

Mac: 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)

Windows上VS的输出: 输出控制台: 该应用已终止. 启动失败.无法在"iPhone 11 iOS 13.2"上启动应用程序"AppName".错误:错误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天全站免登陆