Xamarin.iOS:Visual Studio 2019 更新后无法 运行
Xamarin.iOS: Cannot run after Visual Studio 2019 Update
我遇到了一个奇怪的情况,
更新 Visual Studio 2019 后,我无法 运行 iOS 中的应用程序,当我尝试从 [=46] 运行 时发生这种情况=] 计算机链接到 Mac。
但是当我 运行 应用程序使用 Visual Studio 作为 Mac 而不是 windows 时,应用程序 运行 没有问题。
我查看了 Xcode 的 VS 配置和路径并且是正确的 (/Applications/Xcode.app)。Mac 上的路径存在并且可以访问。
我尝试了以下解决方案,但它不起作用:
打开模拟器 --> 点击顶部菜单 Simulator --> 点击 **Reset Content and Settings.... **
同样在 Windows 和 Mac 中,架构都是 x86_64.
Windows 计算机:
Visual Studio2019专业版16.3.7
Xamarin.iOS 和 Xamarin.Mac SDK - 13.4.0.2 (e37549b)
Mac:
Visual Studio Mac 2019 企业版 8.3.5(内部版本 13)
Xcode11.2 (11B52)
Xamarin.iOS 和 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" 的请求失败。请查看日志以获取更多详细信息。
该应用程序已终止。
构建输出:
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 和 CoreSimulator.Framework 上的 VS 之间存在通信错误。
i 运行 以下命令从终端重新安装 CoreSimulator.Framework:
sudo rm -Rf /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/*
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -runFirstLaunch
然后 Xamarin.iOS 项目的配置正在更改调试端口(新端口),通过 iOS 运行 选项将执行模式设置为默认无后台获取。
希望对其他人有帮助。
这对我有用:
- 更新 Visual Studio 至 16.11.2
- 在 'iOS Build' 下 Visual Studio 的 iOS 项目属性中,我检查了 'Use the concurrent garbage collector'。
我遇到了一个奇怪的情况,
更新 Visual Studio 2019 后,我无法 运行 iOS 中的应用程序,当我尝试从 [=46] 运行 时发生这种情况=] 计算机链接到 Mac。 但是当我 运行 应用程序使用 Visual Studio 作为 Mac 而不是 windows 时,应用程序 运行 没有问题。
我查看了 Xcode 的 VS 配置和路径并且是正确的 (/Applications/Xcode.app)。Mac 上的路径存在并且可以访问。
我尝试了以下解决方案,但它不起作用: 打开模拟器 --> 点击顶部菜单 Simulator --> 点击 **Reset Content and Settings.... ** 同样在 Windows 和 Mac 中,架构都是 x86_64.
Windows 计算机: Visual Studio2019专业版16.3.7 Xamarin.iOS 和 Xamarin.Mac SDK - 13.4.0.2 (e37549b)
Mac: Visual Studio Mac 2019 企业版 8.3.5(内部版本 13) Xcode11.2 (11B52) Xamarin.iOS 和 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" 的请求失败。请查看日志以获取更多详细信息。 该应用程序已终止。
构建输出:
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 和 CoreSimulator.Framework 上的 VS 之间存在通信错误。
i 运行 以下命令从终端重新安装 CoreSimulator.Framework:
sudo rm -Rf /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/*
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -runFirstLaunch
然后 Xamarin.iOS 项目的配置正在更改调试端口(新端口),通过 iOS 运行 选项将执行模式设置为默认无后台获取。
希望对其他人有帮助。
这对我有用:
- 更新 Visual Studio 至 16.11.2
- 在 'iOS Build' 下 Visual Studio 的 iOS 项目属性中,我检查了 'Use the concurrent garbage collector'。