Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/287.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Visual Studio 2017无法连接macOS虚拟机安装的Visual Studio for mac和xcode_C#_Ios_Xcode_Xamarin_Xamarin.forms - Fatal编程技术网

C# Visual Studio 2017无法连接macOS虚拟机安装的Visual Studio for mac和xcode

C# Visual Studio 2017无法连接macOS虚拟机安装的Visual Studio for mac和xcode,c#,ios,xcode,xamarin,xamarin.forms,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

下面是我将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. 无法验证Xcode许可证状态,因为在连接的MAC上未找到“Xcode构建”工具。为了构建和运行iOS应用程序,必须安装Xcode并使其正常工作,因此请检查Xcode是否正确安装,以及iOS设置下指定的路径是否正确。 请参见错误截图:

日志:

Xamarin.Messaging.Ssh.MessagingService |信息| 0 |代理IDB 4.9.0.752正在运行 System.Net.Mqtt.Sdk.MqttClientImpl | Information | 0 | Client vs6604UmerF-收到主题xma/代理状态的应用程序消息 Xamarin.Messaging.Integration.State.ServerStateContext | Information | 0 | IDB 4.9.0.752已启动 Xamarin.Messaging.Integration.State.ServerStateContext |信息| 0 |启动注册代理:。。。 Xamarin.Messaging.Integration.State.ServerStateContext |信息| 0 |服务器状态在192.168.106.128(192.168.106.128)上从AgentStartingState转换为AgentStartedState Xamarin.Messaging.Integration.State.ServerStateContext |信息| 0 |代理已成功启动 Xamarin.Messaging.Integration.State.ServerStateContext |信息| 0 |服务器状态在192.168.106.128(192.168.106.128)上从AgentStartedState转换为ValidatingState Xamarin.Messaging.Integration.State.ServerStateContext |信息| 0 |对“192.168.106.128”执行服务器验证。。。 Xamarin.Messaging.Integration.State.ServerStateContext |信息| 0 |验证Mac操作系统版本兼容性。。。 System.Net.Mqtt.Sdk.ClientPacketListener |信息| 0 |客户端vs6604UmerF-将SubscribeAck消息分派到flow ClientSubscribeFlow System.Net.Mqtt.Sdk.ClientPacketListener |信息| 0 |客户端vs6604UmerF-将发布消息发送到流PublishReceiverFlow和主题xma/消息状态 System.Net.Mqtt.Sdk.MqttClientImpl |信息| 0 |客户端vs6604UmerF-收到主题xma/消息状态的应用程序消息 System.Net.Mqtt.Sdk.ClientPacketListener | Information | 0 | Client vs6604UmerF-将发布消息发送到flow PublishReceiverFlow和主题vs6604UmerF/response/xma/get env info System.Net.Mqtt.Sdk.MqttClientImpl | Information | 0 | Client vs6604UmerF-收到主题vs6604UmerF/response/xma/get env info的应用程序消息 Xamarin.Messaging.Integration.State.ServerStateContext |信息| 0 |正在验证Xcode许可证状态。。。 System.Net.Mqtt.Sdk.ClientPacketListener |信息| 0 |客户端vs6604UmerF-将发布消息发送到流PublishReceiverFlow和主题xma/消息状态 System.Net.Mqtt.Sdk.MqttClientImpl |信息| 0 |客户端vs6604UmerF-收到主题xma/消息状态的应用程序消息 System.Net.Mqtt.Sdk.ClientPacketListener |信息| 0 |客户端vs6604UmerF-将SubscribeAck消息分派到flow ClientSubscribeFlow System.Net.Mqtt.Sdk.ClientPacketListener |信息| 0 |客户端vs6604UmerF-将发布消息发送到流PublishReceiverFlow和主题xma/消息状态 System.Net.Mqtt.Sdk.MqttClientImpl |信息| 0 |客户端vs6604UmerF-收到主题xma/消息状态的应用程序消息 System.Net.Mqtt.Sdk.ClientPacketListener | Information | 0 | Client vs6604UmerF-将发布消息发送到flow PublishReceiverFlow和主题vs6604UmerF/response/xvs/idb/4.9.0.752/get-xcode-location System.Net.Mqtt.Sdk.MqttClientImpl | Information | 0 | Client vs6604UmerF-收到主题vs6604UmerF/response/xvs/idb/4.9.0.752/get-xcode-location的应用程序消息 System.Net.Mqtt.Sdk.ClientPacketListener |信息| 0 |客户端vs6604UmerF-将发布消息发送到流PublishReceiverFlow和主题xma/消息状态 System.Net.Mqtt.Sdk.MqttClientImpl |信息| 0 |客户端vs6604UmerF-收到主题xma/消息状态的应用程序消息 Xamarin.Messaging.Ssh.SshCommandRunner |警告| 0 |无法执行“/bin/bash-c”find”/Applications/Xcode.app/Contents/Developer/usr/bin”-类型f | grep xcodebuild':ExitStatus=1 Xamarin.Messaging.Ssh.SshCommandRunner | Warning | 0 | find:/Applications/Xcode.app/Contents/Developer/usr/bin:Mac上没有这样的文件或目录:

1) 是否安装了
Xcode

  • 如果未在应用商店中获得,请使用您的Apple开发者帐户登录,并从以下位置下载Xcode
    .xip
    文件:

2) 打开
Xcode.app
,并在出现提示时接受许可证

3) 可选:运行
xcode选择--install
安装xcode cmd行工具,并在提示时接受许可证

4) 运行
xcode select-print path
,确保它指向的目录与Visual Studio中的Xamarin iOS选项设置的目录相同,即

  /Applications/Xcode.app/Contents/Developer

回复:

正如@SushiHangover所建议的,您必须确保“指向XCode路径的目录与Visual Studio中Xamarin iOS选项中的目录相同”,问题是在某些情况下,您无法在建立连接之前进行设置(已禁用)

唯一的解决方案是将Xcode.app移动到默认位置,即应用程序文件夹,并将命令行工具移动到/Applications/Xcode.app/Contents/Developer:


如果您最近更新了Xcode,请在Xcode首选项->帐户->登录中检查登录

我也有同样的问题,在用我的苹果ID成功登录后解决了

就我而言,我已经复制并安装了在同事的mac上下载的xcode.xip文件
我必须从appstore中删除并更新xcode。

在我的情况下,终端命令“xcode选择-打印路径”告诉我xcode应用程序安装在文件夹“/Library/Developer/CommandLineTools”中,但将其添加到“Tools | Options | Xamarin | iOS”设置中
  /Applications/Xcode.app/Contents/Developer