c# - Visual Studio 2017无法连接macOS虚拟机安装visual studio for mac和xcode

标签 c# ios xcode xamarin xamarin.forms

将 visual studio 连接到我的 macOS 时出现以下错误。我正在 Win OS 上的 Visual Studio 中构建一个 iphone 应用程序。当尝试运行应用程序时,它显示此错误:

The Xcode License status couldn't be verified because the 'xcodebuild' tool has not been found on the connected MAC. Having Xcode installed and functional is necessary in order to build and run iOS apps, so please check that xcode is correctly installed and that the path specified under iOS Settings is correct.

查看错误截图:

enter image description here 日志:

Xamarin.Messaging.Ssh.MessagingService|Information|0|Agent IDB 4.9.0.752 is running
System.Net.Mqtt.Sdk.MqttClientImpl|Information|0|Client vs6604UmerF - An application message for topic xma/agent-status was received
Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|IDB 4.9.0.752 started
Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Starting registered Agents: ...
Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Server State transition from AgentsStartingState to AgentsStartedState on 192.168.106.128 (192.168.106.128)
Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|The Agents have been started successfully
Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Server State transition from AgentsStartedState to ValidatingState on 192.168.106.128 (192.168.106.128)
Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Performing server validations against '192.168.106.128'...
Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Validating Mac operating system version compatibility...
System.Net.Mqtt.Sdk.ClientPacketListener|Information|0|Client vs6604UmerF - Dispatching SubscribeAck message to flow ClientSubscribeFlow
System.Net.Mqtt.Sdk.ClientPacketListener|Information|0|Client vs6604UmerF - Dispatching Publish message to flow PublishReceiverFlow and topic xma/message-status
System.Net.Mqtt.Sdk.MqttClientImpl|Information|0|Client vs6604UmerF - An application message for topic xma/message-status was received
System.Net.Mqtt.Sdk.ClientPacketListener|Information|0|Client vs6604UmerF - Dispatching Publish message to flow PublishReceiverFlow and topic vs6604UmerF/response/xma/get-env-info
System.Net.Mqtt.Sdk.MqttClientImpl|Information|0|Client vs6604UmerF - An application message for topic vs6604UmerF/response/xma/get-env-info was received
Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Validating Xcode license state...
System.Net.Mqtt.Sdk.ClientPacketListener|Information|0|Client vs6604UmerF - Dispatching Publish message to flow PublishReceiverFlow and topic xma/message-status
System.Net.Mqtt.Sdk.MqttClientImpl|Information|0|Client vs6604UmerF - An application message for topic xma/message-status was received
System.Net.Mqtt.Sdk.ClientPacketListener|Information|0|Client vs6604UmerF - Dispatching SubscribeAck message to flow ClientSubscribeFlow
System.Net.Mqtt.Sdk.ClientPacketListener|Information|0|Client vs6604UmerF - Dispatching Publish message to flow PublishReceiverFlow and topic xma/message-status
System.Net.Mqtt.Sdk.MqttClientImpl|Information|0|Client vs6604UmerF - An application message for topic xma/message-status was received
System.Net.Mqtt.Sdk.ClientPacketListener|Information|0|Client vs6604UmerF - Dispatching Publish message to flow PublishReceiverFlow and topic vs6604UmerF/response/xvs/idb/4.9.0.752/get-xcode-location
System.Net.Mqtt.Sdk.MqttClientImpl|Information|0|Client vs6604UmerF - An application message for topic vs6604UmerF/response/xvs/idb/4.9.0.752/get-xcode-location was received
System.Net.Mqtt.Sdk.ClientPacketListener|Information|0|Client vs6604UmerF - Dispatching Publish message to flow PublishReceiverFlow and topic xma/message-status
System.Net.Mqtt.Sdk.MqttClientImpl|Information|0|Client vs6604UmerF - An application message for topic xma/message-status was received
Xamarin.Messaging.Ssh.SshCommandRunner|Warning|0|Failed to execute '/bin/bash -c 'find "/Applications/Xcode.app/Contents/Developer/usr/bin" -type f | grep xcodebuild'': ExitStatus = 1
Xamarin.Messaging.Ssh.SshCommandRunner|Warning|0|find: /Applications/Xcode.app/Contents/Developer/usr/bin: No such file or directory

最佳答案

在我的例子中,终端命令“xcode-select -print-path”告诉我 XCode 应用程序安装在文件夹中:“/Library/Developer/CommandLineTools”,但将其添加到“Tools | Options | Xamarin | iOS 设置无效。

我终于通过添加 Xcode 路径解决了这个问题:/Applications/Xcode.app Pair to mac XCode path

关于c# - Visual Studio 2017无法连接macOS虚拟机安装visual studio for mac和xcode,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49605060/

相关文章:

iphone - 在导航栏上放置自定义 View

iphone ios xcode 4.2 - EXC_BAD_ACCESS 信号

ios - React Native - iOS Real Device - Socket IO Web Sockets not working

c# - MVC - 绑定(bind) ICollection 属性

c# - 分割时无法将string []隐式转换为字符串

c# - ASP.NET HttpContext 项目在服务器上消失

ios - 类型 "GameScene"不符合协议(protocol)“SKPaymentTransactionObserver

ios - UIScrollView 仅在任意应用程序交互后有效

xcode - 带有 XCode 6 Beta 7 的 Swift 在注册通知方面有问题

c# - 使用属性而不是方法变量的缺点