If Visual Studio is not able to connect with the iOS Build Host, a good first step is to work through the steps in the troubleshooting guide: http://developer.xamarin.com/guides/ios/getting_started/installation/windows/troubleshooting/.
Note: the "Diagnose" diagnostic tool should only be used while Visual Studio is not connected to a build host. Using this tool when VS is already successfully connected can yield confusing results. In general the diagnostic tool cannot help for problems that occur after Visual Studio has successfully paired with the build host. For example, the tool usually won't be helpful to diagnose errors during building, deploying, or debugging.
If you can't find the build host to run the Diagnose tool, manually check connectivity to the build host
In order to run the Diagnose tool, you'll need to be able to find the build host either using Bonjour or directly by IP address. If the build host is not running properly on the Mac, this won't be possible. Here are some tests to make sure the build host is running correctly. (The example results assume Visual Studio is not currently paired with the build host. Note that the
$ character at the beginning of the commands below represents the prompt in Terminal.app. Do not include the
$ character when entering the commands.)
Make sure that the OS sees that the Xamarin.iOS Build Host app is running
$ ps -x | grep Xamarin\.iOS | grep Applications 2627 ?? 0:02.17 /Applications/Xamarin.iOS Build Host.app/Contents/MacOS/Xamarin.iOS Build Host
lsofto check if the Xamarin.iOS Build Host app
launchditem is listening on port 5000 (the
sudocommand must be run as an administrator)
$ sudo lsof -i -P | grep -i ':5000.*listen' launchd 1 root 42u IPv4 0xf58fa9c47927e243 0t0 TCP *:5000 (LISTEN) launchd 1 root 53u IPv6 0xf58fa9c4709bd463 0t0 TCP *:5000 (LISTEN) launchd 1 root 56u IPv4 0xf58fa9c47927e243 0t0 TCP *:5000 (LISTEN) launchd 1 root 57u IPv6 0xf58fa9c4709bd463 0t0 TCP *:5000 (LISTEN)
Try re-running the
launchctlcommand to unload + reload the launch daemon, just to be thorough
$ launchctl unload -w /Library/LaunchAgents/com.xamarin.mtvs.buildserver.plist $ sudo lsof -i -P | grep -i ':5000.*listen' $ launchctl load -w -F /Library/LaunchAgents/com.xamarin.mtvs.buildserver.plist $ sudo lsof -i -P | grep -i ':5000.*listen' launchd 1 root 42u IPv4 0xf58fa9c4760b6973 0t0 TCP *:5000 (LISTEN) launchd 1 root 56u IPv6 0xf58fa9c4709bd463 0t0 TCP *:5000 (LISTEN) launchd 1 root 57u IPv4 0xf58fa9c4760b6973 0t0 TCP *:5000 (LISTEN) launchd 1 root 64u IPv6 0xf58fa9c4709bd463 0t0 TCP *:5000 (LISTEN) $ launchctl list | grep xamarin - 0 com.xamarin.mtvs.buildserver 98586 - com.xamarin.mtvs.buildservergui.199440
If all of those succeed
If all of the above tests match the example output, you can try connecting to the build server from the Windows machine via
Install the Telnet Client from "Programs and Features -> Turn Windows features on or off."
In a command prompt, run:
telnet "buildhost IP address" 5000
(Replace "buildhost IP address" with the IP address of your Mac)
HELOand press return. Note:
HELOis intentionally spelled with just one "L".
If everything's working correctly, the build server will reply with something like this:
Testing accessibility of the MTBSERVERPORTS
Usually if this first
telnet test succeeds, then Visual Studio will be able to pair successfully with the build host. If you encounter other connectivity issues, you can perform 2 more small tests to make sure that both of the "MTBSERVERPORTS" are also accessible from the Windows computer:
Keep the original
telnetsession running after it returns the "MTBSERVERPORTS". This is necessary because the Mac build host will only keep the "MTBSERVERPORTS" open as long as the original session on port 5000 remains open.
In a new command prompt window, run:
telnet "buildhost IP address" 52566
(Replace "buildhost IP address" with the IP address of your Mac, and replace 52566 with the specific port returned by "MTBSERVERPORTS" from earlier.)
After the connection succeeds, close the command prompt window. In this case we are just testing for accessibility, so there is no need to send any
Repeat steps 2 and 3 with the other port returned by "MTBSERVERPORTS" ("52567" in this example).
If the steps to test the connectivity manually via
telnet do not reveal any unexpected output, then the best next step is to collect the relevant logs and information and send all of that to Xamarin support.