Working on a .NET Application on a Mac OS / MacBook

Recently, I switched from using Django to ASP.NET for the web application that I am building. While I still enjoy using Microsoft's framework, a sort-of unique problem presented itself: I have a MacBook. How do I work on a .NET app using a Mac OS?

While I do have a desktop PC running Windows 10 sitting in my "work room", I much prefer the idea of working from the comforts of my couch, or the patio, or even the kitchen. This means that I am not stuck in the sitting position (reminds me of work a bit too much) and I get to spend more time with my SO (this time I mean significant other - not StackOverflow), who is probably also on the couch watching House of Cards or similar.

Despite Microsoft's attempts to make more of their software cross-platform, Visual Studio is not there yet; Visual Studio Code, while a great text editor, is just that - a text editor. Unfortunately, working on an ASP.NET app using a text editor is a challenge in itself (at least for now).

The solution was clear: I needed Windows on a laptop.

I loathed the idea of using BootCamp on my MacBook Pro simply because I dislike the notion of dual booting (I still like Mac OS). The other option was Virtualization through VirtualBox, Parallels Desktop, or VMWare. I opted for Parallels simply because I felt it had the most features and, by the looks of it, integrated with the Mac OS perfectly and caused little-to-no performance issues when running a Virtual Machine (compared with the other two).

Parallels, unlike VirtualBox, is not free - it's $99 for the "Pro" license per year. They do have a student license which brings the price down to $39 per year, which is a great deal. Additionally, if you have Visual Studio Dev Essentials subscription, you can get 3 months of free trial for Parallels Desktop.

The MacBook in my case is the 2015 i7 model with 16GB of RAM so I had little doubt that running Windows alongside will cause any performance degradation of the host system. For what it's worth, I ran a similar setup on my girlfriend's late 2013, i5 MacBook Pro with 8GB of RAM. It was not as good, but still definitely usable.

Naturally, it running inside a virtual machine, I did, however, have concerns about the performance of the virtual machine itself - build times? How long will it take to run all the tests? I am not a patient man.

To my (pleasant) surprise, the builds and test runs were faster than they were on my desktop - which, admittedly, is 4 years old. I assigned 6 GB of RAM to my virtual machine and 4 CPU cores. Otherwise, I kept all the Parallels settings set on their defaults.

The VM has Windows 10 on it, running Visual Studio 2015 (with ReSharper), Chrome, and that's about it. I made the VM run in fullscreen and positioned it right next to my "main" Mac desktop - so it's always a three-finger-swipe away. Although I must admit that the Parallels "coherence" mode is very sexy.

Visual Studio 2015 running in Coherence mode. Notice the Finder with the C: drive open and Windows apps in the Dock

The integration that Parallels provides is impeccable. As you can see from the screenshot above, in Coherence mode, you can also run your Windows apps independently alongside of your Mac apps - they will even show up in the Dock! Not only that, but the system bar/tray can also integrate nicely with each other. Hell - even spotlight searches show Windows apps as results!

From within the Virtual Machine itself, you can access the Mac OS drive through Windows Explorer as normal. There is no need to deal with any of the "my Mac can't read/write NTFS drives" nonsense. Everything just works.

The battery is as good as ever, though I did notice that the CPU usage from the Parallels goes up every now and then when the machine is seemingly idle. This lasts up to a couple of minutes at most so it is not a huge deal at this point, but it is worth noting.

I am still new to this setup, having used it for only a week or so - but so far I love it. When I connect it to my dual-screen setup at my desk, I have Windows open on one monitor and the Mac OS on the other. In fact, I bought the Dell XPS 15 9550 laptop to compare - but I was not really happy with that laptop - battery life and trackpad do not come anywhere near a MacBook Pro and some of the Windows apps had weird scaling issues for which there was no solution, short of abandoning the app. Funnily enough, that same app is available and works perfectly fine on a retina MBP.

If you are curious about running Windows on a Mac OS or hesitate using .NET as your development stack and/or C# as the language, I'd say give Parallels a try. They offer a 14 day free trial as well and I don't think you will be disappointed.