Using the Old Xamarin.VS Build Host Application
For Xamarin.VS 3.* users.
Let us know how you feel about this
last updated: 2016-12
This article helps resolve some issues that may occur when connecting Visual Studio to your Mac Build Host.
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.
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, refer to the Connecting to the Mac guide.
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:
- Go to System Preferences… from the Apple menu.
- Select Security & Privacy in the Personal section.
- Select Firewall from the segmented control at the top of the window.
- 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.
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.
After the installation process is complete, there are still a few more steps required to get everything working:
- Link Your Xamarin Account – Ensures that all features you are entitled to are enabled. You can create a new Xamarin Account if required.
- Connect Visual Studio to the Mac Build Host – Visual Studio must be connected to the Mac Build Host before it can work with iOS projects.
- Configure the Visual Studio Toolbar – Lets you easily access Xamarin.iOS features.
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 instuctions 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:
Open the Xamarin Build Host application.
Click Pair. The Build Host will provide you with a PIN:
Copy, or take note of, the PIN:
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:
Choose your Mac Build Host and click Connect. Visual Studio will then ask for the PIN:
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
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:
- Press Command + Space on your Mac to open Spotlight.
- Type "xamarin build host" into the search bar.
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:
Attempt a manual connection by clicking Configure Host Manually:
Run the diagnostic tool (click Diagnose) using the manually created Build Host entry:
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:
- '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
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.