Using the Old Xamarin.VS Build Host Application

For Xamarin.VS 3.* users.

PDF for offline use
Related Articles:

Let us know how you feel about this

Translation Quality


0/250

last updated: 2017-03

This article helps resolve some issues that may occur when connecting Visual Studio to your Mac Build Host.

🚫

Note: This content has been deprecated. Xamarin.iOS for Visual Studio 4.0 introduced the Xamarin Mac Agent, which negates the need for the manual pairing process used by the Xamarin.iOS Build Host. Instead, it uses SSH to securely connect to your Mac machine, meaning there is no longer an additional application running on both machines. For more information, refer to the Connecting to the Mac guide.

Overview

Developing Xamarin.iOS applications requires an active connection to a Mac which builds, runs, and deploys your application. To make this connection, versions of Xamarin.iOS for Visual Studio 3.11 and earlier used the Xamarin.iOS Build Host application to pair the two machines.

Mac Installation and Configuration

Once Xamarin has been installed on your Mac, ensure that you have turned off your firewall to allow Visual Studio to connect. To do this:

  1. Go to System Preferences… from the Apple menu.
  2. Select Security & Privacy in the Personal section.
  3. Select Firewall from the segmented control at the top of the window.
  4. If the firewall is turned on, click the lock (bottom left) so that you can change the setting, then click Turn Off Firewall.

You may also want to read the Xamarin Firewall Configurations Instructions to ensure that there are no additional endpoints you need to whitelist.

Your Mac is now ready to operate as a Build Host for Xamarin.iOS for Visual Studio.

iOS Developer Setup

For iOS development, it is important that your Mac machine is configured with the relevant signing identities. This allows you to correctly sign your apps so that they will be distributed either via the App Store or Ad Hoc. Follow the link below for instructions on setting up a Mac for iOS development with Xamarin. These are the same steps whether you are using Xamarin Studio or Visual Studio – if you’re already a Xamarin.iOS developer, then you’ve probably already taken these steps:

Once your Mac is configured, it’s time to set up your Windows computer.

Windows Installation

To use the Build Host application with Xamarin.iOS for Visual Studio, you must download and install a version of Xamarin.iOS for Windows earlier than 3.11 from the downloads page.

Installation Complete

After the installation process is complete, there are still a few more steps required to get everything working:

Linking to Your Xamarin Account

You must link your Xamarin account to your Visual Studio installation to access all the features you are entitled to, and to activate your license.

In Visual Studio, go to the Tools > Xamarin Account… menu item:

The Xamarin Account dialog will appear. Click Log In to enter your Xamarin credentials. If you don’t already have a Xamarin account, the next screen will provide a link allowing you to create one:

Enter your Xamarin Account details and click Log In, or create a new account:

After a few seconds your Xamarin subscription will be activated with the relevant subscription tier that you have purchased:

This screen indicates that your Xamarin Account has been successfully linked to Xamarin for Visual Studio:

Connecting to the Mac Build Host

After installation, the Configuration Wizard will automatically start when you open an iOS project in Visual Studio. You can update the Mac Build Host settings later from the Tools > Options > Xamarin > iOS Settings panel in Visual Studio.

⚠️

Note: The version of Xamarin.iOS on the Mac and under Visual Studio must be identical.

If they are running on different versions, there is a good chance that the build host will not connect.

The last stable versions of Xamarin.iOS which include the Build Host are:

  • Visual Studio (Windows Side) – Xamarin.iOS 3.11
  • Xamarin Studio (Mac Side) –  Xamarin.iOS 9.1

Mac Build Host Detected Automatically

When the Configuration Wizard opens, it shows instructions for how to open the Xamarin Build Host on the Mac using Spotlight:

To connect your Mac Build Host, do the following on your Mac:

  1. Open the Xamarin Build Host application. Click Pair. The Build Host will provide you with a PIN:

  2. Copy, or take note of, the PIN:

  3. Switch to Visual Studio and choose Next in the Configuration Wizard. If your Mac is correctly configured, the Wizard will list it as a possible Build Host:

  4. Choose your Mac Build Host and click Connect. Visual Studio will then ask for the PIN:

  5. Once the machine PIN is entered, Visual Studio will connect to the Build Host and let you compile, deploy and test iOS projects:

To unpair the Build Host from Visual Studio, open the Xamarin.iOS Build Host and click Unpair:

Xamarin.iOS for VS Build Host Connection Troubleshooting

This section will cover the steps to take when the build host is not visible from Visual Studio and the information to include with any issue reports.

Where is my Build Host?

ℹ️

Note: Xamarin.iOS for Visual Studio 4.0 introduced the Xamarin Mac Agent, which negates the need for the manual pairing process used by the Xamarin.iOS Build Host. Instead, it uses SSH to securely connect to your Mac machine, meaning there is no longer an additional application running on both machines. For more information on the Xamarin Mac Agent, refer to the Xamarin Mac Agent guide.

The steps below assume that you are using versions of Xamarin.iOS that are compatible with the Xamarin Build Host application

Once you have installed Xamarin on both Mac and Windows, you'll need to connect Visual Studio to the Mac.

In some cases, you may be faced with an empty build host list:

The most common cause is that the Xamarin.iOS Build Host app is not open on your Mac.

Starting with iOS for VS 1.6, having the Build Host app open is required in order to connect. Here's how you do it:

  1. Press Command + Space on your Mac to open Spotlight.
  2. Type "xamarin build host" into the search bar.
  3. Select the Xamarin.iOS Build Host application from the list.

If you have turned off Spotlight indexing, or you're currently waiting for the index to refresh, you can find the Xamarin.iOS Build Host app in your /Applications folder:

Once the Build Host app is open on your Mac, you should see the server appear in the build host list after a brief delay. At that point, you can continue following the Connecting to the Mac Build Host guide.

If you still do not see your Mac Build Host in the list, you can try to manually connect:

  1. Attempt a manual connection by clicking Configure Host Manually:

  2. Run the diagnostic tool (click Diagnose) using the manually created Build Host entry:

  3. Look through the diagnostic tool results for actions to take:

The Actions section of the failed diagnostic steps will provide you with further instructions.

Once the problems listed by the diagnostic tool have been resolved, you should be able to establish a connection with your build host.

I still can't see my Mac Build host or connect manually. What next?

In some cases, these steps might not help resolve the issue you're experiencing. We may need to have you get in touch. Please select one of the support options available to you.

In your communication with the support team, please include the following logs, output, and information:

  • Windows log file(s): %LOCALAPPDATA%\Xamarin\Log %LOCALAPPDATA% is interpreted by Windows Explorer as the current user's AppData folder. Zip up the whole folder of log files.

  • Mac log file: ~/Library/Logs/Xamarin/MonoTouchVS/mtbserver.log

  • 'Mac Server Log' output from Visual Studio
  • VM software being used (if applicable)
  • VM software network settings (if applicable)
  • Any non-standard network settings or proxy information
  • Xamarin VS extension version information from Tools > Extensions and Updates

Summary

In this article, we've covered what steps to take when your Mac Build Host is not appearing and provided a list of information you can collect to help get you up and running as quickly as possible.

Xamarin Workbook

If it's not already installed, install the Xamarin Workbooks app first. The workbook file should download automatically, but if it doesn't, just click to start the workbook download manually.