Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2017 fail to connect macOS virtual machine installed visual studio for mac and xcode

Below error I am getting when I am connecting the visual studio to my macOS. I am building an iphone app in Visual Studio on Win OS. When try to run the application it showing this error:

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.

see screenshot of error:

enter image description here Logs:

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
like image 270
Umer Mahar Avatar asked Apr 02 '18 03:04

Umer Mahar


5 Answers

In my case the terminal command "xcode-select -print-path" told me that the XCode app was installed in the folder: "/Library/Developer/CommandLineTools" but adding this to the "Tools | Options | Xamarin | iOS Settings did not work.

I finally solved it by adding the Xcode path: /Applications/Xcode.app Pair to mac XCode path

like image 119
René AD Avatar answered Nov 15 '22 13:11

René AD


I fixed the same issue by resetting the commandline tools from Terminal using the command: sudo xcode-select --reset

This command changed my default path to /Applications/Xcode.app/Contents/Developer from /Library/Developer/CommandLineTools. The connection started working after that.

like image 45
Mike C. Avatar answered Nov 15 '22 13:11

Mike C.


On your Mac:

1) Is Xcode installed?

  • If not get it for the App Store or login with your Apple developer's account and download the Xcode .xip file from:

    https://developer.apple.com/download/more/

2) Open the Xcode.app and accept the license if prompted

3) Optional: Run xcode-select --install to install the Xcode cmd-line tools and accept the license if prompted

4) Run xcode-select -print-path to ensure that the directory that it points to is the same one that the Xamarin iOS options in Visual Studio is set to, i.e.

  /Applications/Xcode.app/Contents/Developer

re: https://learn.microsoft.com/en-us/visualstudio/mac/installation

like image 36
SushiHangover Avatar answered Nov 15 '22 12:11

SushiHangover


If you recently updated Xcode, check the login in xcode Preferences->Accounts->signin

I had same issue, solved after successfully signed in with my apple ID.

In my case I have copied and installed xcode.xip file downloaded in colleague's mac I had to remove that and update xcode from appstore.

like image 32
user2247929 Avatar answered Nov 15 '22 14:11

user2247929


As @SushiHangover suggested, you must ensure "that the directory that points to XCode path is the same one in the Xamarin iOS options in Visual Studio", the problem is that in some cases you can't set it before establishing the connection (disabled)

SDK path desabled

The only solution is that case is to to move your Xcode.app to the default location which is the application folder, and move the command line tools to the /Applications/Xcode.app/Contents/Developer:

enter image description here

like image 21
SamTh3D3v Avatar answered Nov 15 '22 12:11

SamTh3D3v