How Do I Set Up A .NET Development Environment On A MacBook Pro?
Setting Up a .NET Development Environment on a MacBook Pro and the Development Experience There has been a bit of buzz around using MacBook Pros for .NET development, since they are such elegant and well-made machines. I was always skeptical because I just knew there’d be quirks, and I don’t love dealing with quirks – and […]
Setting Up a .NET Development Environment on a MacBook Pro and the Development Experience
There has been a bit of buzz around using MacBook Pros for .NET development, since they are such elegant and well-made machines. I was always skeptical because I just knew there’d be quirks, and I don’t love dealing with quirks – and for what? A sleek and good-looking machine? Plus, I’ve been a PC user since I was a kid. Well, after hearing the gazillionth person rave about how great a Mac is, that yet another .NET guru had made the switch, and that the engineers at Google use them, my curiosity about OS X had piqued. I decided to go for it.
Here are some key things I had to do to make the experience go much better than I expected.
Boot natively into Windows or a Virtual Machine (VM) in OS X? Why commit?
I assumed I’d have to dual boot into Windows to get an acceptable performance. That was my first misconception. I have been running a Windows 7 VM via Parallels, and I am pretty blown away by how well it works. And I’ve used VMs for years in the past (Windows Server VMs on a PC)! For the record, I am using the latest version of Parallels (currently version 8) and Boot Camp that came with OS X Mountain Lion (10.8.3).
My second misconception was that if I did want to natively boot into Windows, I couldn’t use the same VM that Parallels used – I’d have to have another one on a different partition. Wrong again. With Boot Camp for the VM (free with OS X Lion) and Parallels for running it within OS X, I am using the same VM. I actually find myself rarely booting natively into Windows, but I love that I have the option.
Keyboard mapping for the Windows VM
The next thing I really had to do was change some keyboard mappings. OS X took over my F keys, but that is easily fixed in “Mac System Preferences > Keyboard > Use all F1, F2, etc. keys as standard function keys”.
I also had to change a few mappings in the Keyboard Shortcuts section in the same place. For example, shortcuts like Alt-F4 work in Windows to close applications. Basically, I learned I can get all my Windows keyboard shortcuts back much more easily than I originally thought. There aren’t as many re-mappings I had to actually do that would interfere with OS X. I’m liking some of the Mac keyboard shortcuts better anyway, like Command-W to close a window (not stretching my fingers as much as Alt-F4 = less carpel tunnel?) – and it works the same in Windows.
One outlier was the F6 key to build in Visual Studio. If you use Parallels, it specifically maps that key to switch from OS X to Windows and back. You can turn that off by going to Parallels > Preferences > Shortcuts > System Shortcuts > uncheck ‘Show and hide Parallels desktop’.
Adjusting Retina display resolution in the Windows VM
The next very key thing I had to do was fix the screen resolution. The resolution is too high on the Retina display for Windows to really handle properly at this point. Certain elements are crazy, laughably small, and upping the DPI doesn’t fix them all. The trick is to change your Mac resolution to Scaled, and set a higher resolution than the “Best for Retina” preset.
1. Go to System Preferences > Displays
2. Click Scaled, and choose one of the 2 to the right depending on how small you like things in OS X (click thumbnail at left for a screen capture). If you use the Boot Camp / Parallels combination, you must set the resolution in the VM settings as well for it to stick.
3. Now go to the Windows Display settings, and lower the resolution from the crazy 2880×1800, to 1620×1200, or 1920×1200 depending on what you chose for the resolution in OS X
4. Keep the DPI at 100%, and everything should now look normal in Windows. This put me way over the edge of loving a Mac over a PC.
I have really enjoyed learning OS X and getting a new perspective on how things are done. Some things are better, some worse, some just different. It has made me more skilled in Windows by learning things on Mac that I thought I should be doing on the PC.
The screen on the Mac is incredibly beautiful. This almost makes it worth it to me alone. The keyboard feels great, and I even now have the option to develop iOS and OS X apps if I’d like. Plus, the machine just works so well. The battery life is great, as is the sleep management, letting you just close the laptop (I never do anything else). The trackpad on the Mac is truly amazing and far ahead of any competitor – gestures that do all kinds of things feels so natural and side-by-side with the Windows VM it’s still very useful. Swiping from OS X to Windows feels empowering. Swiping my fingers anywhere down the trackpad to scroll down feels right.
The MacBook Pro is so well-designed and definitely works well enough for .NET development. I was expecting less of an experience, but was willing to deal with it. While it is not quirk-free, following the steps above makes the Windows on Mac experience almost the same as on a PC, plus I get all of OS X to play with, which really is quite sleek. There no doubt there will be some re-learning in doing your typical short-cuts, and there’s overall a lot to get used to. I am still not as fast as I am on a PC, because of the slightly different keyboard and shortcuts that I didn’t re-map, as well as just pure OS X operations. Up to this point however, I am finding it worth it. I get to see the best of both worlds (albeit the worst of both too) but with some re-learning, I am finding it an exciting experience.
Have your own tips for switching development environments to Mac? We’d love to hear them!
You Might Also Like
.Net Core 2.1 was announced recently by Microsoft along with corresponding updates for ASP.Net Core...
In my previous post, I gave an overview of NancyFX, an open source and community...