1

Visual Studio is the recommended tool (superseding Xamarin Studio) on both Windows and Mac. However, the VSTS page Build your Xamarin app says to use "Xamarin". Presumably that means Xamarin Studio, even though the the "Install Xamarin" link on the page points to Visual Studio. That ambiguity and the March 6 date on the page indicate that it was overlooked during the rollout of Visual Studio 7 for Mac, leaving us to wonder what is the right approach for setting up an agent.

What is the best way to create an iOS build agent these days? Do you install Visual Studio for Mac or Xamarin Studio?

Edward Brey
  • 40,302
  • 20
  • 199
  • 253
  • It seems like the question you are asking is whether Visual Studio for Mac can serve as a VSTS build agent. That is a very good question. With all the Microsoft-induced tooling flux, I've been telling our team "don't breathe on the Mac build server" for a few months now. I hope you get some good answers or ideas. – Mark Larter May 23 '17 at 03:53
  • 1
    Since VS for mac is replacing Xamarin Studio, you should install VS for Mac. – starian chen-MSFT May 23 '17 at 09:08

2 Answers2

2

Sounds like a bit of confusion here in the terminology. The IDE is now Visual Studio for Mac, but the underlying framework is still Xamarin. That is to say, Xamarin.iOS/Xamarin.Android/Xamarin Forms are "integrated" into Visual Studio for Mac; they are the tools that will compile and package your mobile app. This is what the VSTS build task page is saying when it asks you to "Install Xamarin".

As for setting up a VSTS build agent, here's a checklist that will hopefully get you going:

  1. Download and install Visual Studio for Mac on a computer running OS X/macOS. Confirm that Visual Studio for Mac can indeed build and sign the IPA's.
  2. If necessary, install all the certificates and provisioning profiles, and confirm that the IPA is correctly signed.
  3. Create a build project in VSTS.
  4. Install the VSTS build agent for OS X/macOS and connect/register the build agent to the VSTS project. Please be aware that the Xamarin license task/utility is deprecated and no longer needed. If that does appear as a step in your VSTS build project, delete it.
  5. Go back to VSTS, and configure the VSTS project to build the Xamarin.iOS project via the OSX/macOS build agent. Once the build agent is connected to the VSTS project.

I'll admit, there is a lot of moving parts and things to do here. I hope this high level overview is enough to point you in the right direction.

Tom Opgenorth
  • 1,511
  • 1
  • 12
  • 19
1

Per starain's advice, I tried installing VS for Mac. It started up, but failed with an 'Unable to parse condition "!(Exists($(SharedVersionOutputDirectory)))"' error. I've encountered several bugs in the Xamarin tool chain, so this may have nothing to do with VS vs. XS, but just be part of the current duct-tape-and-bailing-twine experience. OTOH, there's still a top-level Xamarin page saying VS Mac is still preview, so who knows how baked it really is?

So even though the Mac build agent does find and run the VS Mac build tooling, I gave up and used my Windows build agent instead, and had MSBuild on Windows connect to the Mac for the iOS build.

Edward Brey
  • 40,302
  • 20
  • 199
  • 253
  • Fwiw, we've burned a fair number of hours over the past few months with abortive attempts to "keep up" with the changes. The direction is positive, so our patience is high, but I think it's still early days for switching to the new tooling for Xamarin apps that are or will be shipping soon. – Mark Larter May 25 '17 at 00:49