Full Time .Net & Xamarin Development on a Mac Part 1

Recently I started working full time on a Xamarin app for my job at Paylocity and for Resgrid a fair amount of my development especially when traveling has been on a Macbook Pro. So I’m approaching my new Xamarin environment with my previous scars and while it’s fresh in my mind I’ll share my experiences.

xs-iconThis will be a multi part series about my experience utilizing a Mac in .Net/Xamarin workflow. In this first post we are going to talk about the base hardware configuration and setup.

So where do you start off? This can be a daunting question and lots of things come into play. But first things first, you need a development hardware. When your doing Xamarin development you have a number of computer usage scenarios you can work off of:

1.) Full Time Dev on the Mac with Windows in a VM utilizing 1 machine (a Mac). The benefit of this pattern is that you only have 1 box to work on. The drawback is that you will be utilizing a VM for the Win8/Visual Studio parts and memory/performance is a concern. Only iMac’s and Mac Pro’s get you above 16GB of RAM. I would recommend 32GB for VM scenarios, and remember the Mac isn’t so good at reclaiming memory.

2.) Utilizing the Mac as a build host for Xamarin and working on a Windows machine full time, utilizing 2 boxes (1 Windows PC and 1 Mac). The benefit of this is if your doing .Net work most of the time you will have a first class experience (native VS development) but when your using Xamarin and need the iOS simulator you will have to switch to the mac (this will break your developers flow and add friction).

3.) Windows for full time development and if iOS isn’t a priority (yet) or a light priority you can utilize just a Windows machine for primary development and then use a service like MacInCloud for iOS building and testing. Also note MacInCloud is great for Team City and other CI, saves you hardware and allows you to easily offload Team City to say Microsoft Azure without worrying about tunnels into your network to access LAN hardware.

So why a Mac with a Windows VM or have a Mac at all? Well first if your development any iOS/Apple applications/games, etc your are technically and legally required to have genuine mac hardware in the mix somewhere. So why no Windows box with a Mac VM? Apple doesn’t allow it, and Hackintosh’s have a very tricky relationship with updates and XCode.

What will you find is that the first scenario is the most popular. Some co-workers went to Xamarin Evolve and almost everyone was running around with a Mac Book Pro. All my Xamarin University class instructors have been utilizing that scenario as well. This is also the scenario I would recommend. This is because it will be the least amount of hardware to manage and maintain, and it will reduce development friction and prevent flow killing context switching.

So now what mac do you buy? First I’d shy away from any i5 processor, most of them only have 2 cores (4 virtual if you include Hyper Threading). An i7 Quad core will increase your overall speed, give the host machine and the VM enough physical cores to access (because of my IT/SysAdmin background I’m not a huge fan of doubling up CPU extensive workloads on Hyper Threaded virtual processors).

Next is RAM, oh Apple and hardware component price gouging. This can get tricky, depending on the .Net workload. If you require SQL Server and/or multiple versions of Visual Studio open (i.e. you have 2 major solutions that you need to work on at the same time) you will want a minimum of 32GB of RAM for the Mac. This limits you to an iMac/iMac Retina or Mac Pro (ouch). If you only need 1 instance of Visual Studio open at a time and you don’t need SQL Server for any heavy lifting (i.e. a database many gigs in size) then 16GB is a good RAM size.

For optimal operation with a 16GB RAM size I’d recommend a minimum of 4096GB for the Windows VM or 6144GB if you need more memory on the VM (i.e. extensive use of Windows resources, like IIS or installed services). Give your Mac a fair amount of room to breath and utilize an app like Memory Clean to track usage and reclaim memory. If you only need 16GB of ram a MacBook Pro is by far your best bet, giving your developers a great system and portability. If you need 32GB give your VM 16384GB and keep the rest for your mac.

Also if at all possible get the biggest SSD/Flash drive you can. Keep your VM size down to the minimum (i.e. for all your installed programs, swap space, and some extra) you need and utilize shared resources as much as possible (i.e. shared folders on the hard drive from the Mac). This will reduce VM and host system load and startup times. Additionally utilizing shared folders you can quickly edit files from the host system instead of having to spin up the VM.

Multiple system solutions may be cheaper (i.e. a 500 buck Windows box and a 500 buck Mac mini) from the initial cost, but don’t underestimate the hidden\long running costs. Your developers will constantly be fighting with connection issues, maintaining 2 operation systems that are on 2 separate boxes, maintaining 2 separate hardware platforms and switching systems and thus contexts all of which will add friction and slow down the pace of development.

In future posts I’ll delve into Virtualization products, configuration, apps, and issues.

Resgrid is a SaaS product utilizing Microsoft Azure, providing logistics, management and communication tools to first responder organizations like volunteer fire departments, career fire departments, EMS, search and rescue, CERT, public safety, disaster relief organizations, etc. It was founded in late 2012 by myself and Jason Jarrett (staxmanade).

About: Shawn Jackson

I’ve spent the last 18 years in the world of Information Technology on both the IT and Development sides of the aisle. I’m currently a Software Engineer for Paylocity. In addition to working at Paylocity, I’m also the Founder of Resgrid, a cloud services company dedicated to providing logistics and management solutions to first responder organizations, volunteer and career fire departments, EMS, ambulance services, search and rescue, public safety, HAZMAT and others.