Connecting the TFS Server to the Xamarin Mac Agent

PDF for offline use
Related Articles:

Let us know how you feel about this

Translation Quality


last updated: 2017-03

Although many of the tasks associated with developing a mobile app with Xamarin can be performed on either Windows or OS X, building, testing, and creating iOS App Store Packages (.IPA files) for distribution require a Mac OS X machine. For Xamarin developers using Visual Studio and Team Foundation Server, this means you must have a Mac OS X machine on your local network with Xamarin.iOS installed, which will serve as the Xamarin.iOS build host.

The following steps will connect Visual Studio on the TFS machine to the Mac OS X build host. This typically needs to be done just once as Visual Studio will remember the connection across sessions. You can also use this same process for Visual Studio on any individual developer's machine.


  1. Open Spotlight (Cmd-Space) and search for Remote Login then and select the Sharing result. This will open the System Preferences at the Sharing panel:

  2. Tick the Remote Login option in the Service list on the left in order to allow Xamarin for Visual Studio to connect to the Mac:

  3. Make sure that Remote Login is set to allow access for All users, or that your Mac username or group is included in the list of allowed users in the list on the right.

Your Mac should now be discoverable by Visual Studio if it's on the same network.


  1. Log in to the TFS machine.
  2. Start Visual Studio, and select the Tools > Options... menu command.
  3. Navigate to Xamarin > iOS Settings on the left side:

  4. Click Find Mac Agent, which brings up the Host Selection dialog:

  5. Select your Mac from the list, and click Connect....

  6. You will be prompted for the administrative credntials of your Mac host. Enter these:

  7. The Xamarin Mac Agent should now be successfully connected to your Mac. A "connection successful" icon, similar to the one below will be shown when the connection has been made:

When you now build a Xamarin.iOS project from Visual Studio, including builds run on the TFS machine through continuous integration, the process is delegated to the Mac build ho st machine. Similarly, when you then launch a Xamarin.iOS app in Visual Studio for debugging, you can indicate whether to run in the iOS simulator or directly on a tethered device. Either way, you'll have full debugging capabilities in Visual Studio through the Mac host.

For more information on using the Xamarin Mac Agent, refer to the Xamarin Mac Agent and Troubleshooting guides.

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.