Macbook Pro Visual Studio



After a much-needed refresh, the MacBook Air (M1, 2020) has brought a number of great updates that make it one of the best laptops for programming. While the 13-inch MacBook Pro (also on this list) is more powerful, the thinner and lighter (and more affordable) MacBook Air now comes with the same Apple-made M1 chip as the the Pro, which means it's no slouch when it comes to programming.

  1. I recently installed Windows 10 on my Macbook so I could install and use Visual Studio for college. It installed perfectly and runs nicely, but I am not sure about how to actually run the programs so I can see the output.
  2. There are generally 3 ways to get visual studio on Macbook Pro: Install windows via Bootcamp, Run windows via a virtual machine, Install windows via Bootcamp then run the image as a VM with parallel.
  3. Connect to the internet via Wi-Fi 6 (802.11ax) and use compatible wireless peripherals and accessories with Bluetooth 5.0. The two Thunderbolt 3 ports provide USB4 support and can even connect to the Apple Pro Display XDR in full 6K resolution. Apple also included studio-quality mics for clear recordings and calls.

There are generally 3 ways to get visual studio on Macbook Pro:

  1. Install windows via Bootcamp,
  2. Run windows via a virtual machine,
  3. Install windows via Bootcamp then run the image as a VM with parallel.

In this article I am focusing on the first option to dedicate maximum CPU and ram for visual studio, MSSQL and IIS.

Check if your Macbook Pro is supported

Anything 2013 early 15” Retina and later should support 10. If you’re not sure, check Apple’s list at https://support.apple.com/en-sg/HT204990#models

Getting windows 10 installer image

For those on Bizspark, you can download the enterprise edition iso at https://msdn.microsoft.com/en-us/subscriptions/downloads
(To reach here from Bizspark website after logging in, click on the small “get tools” link on the top right, and again “MSDN Subscription” in the same area on the new page.)

If you’re wondering why some versions have a “N” suffix, those are versions without media technologies (media player, codecs, etc.) bundled.

Run Bootcamp assistant

Allocating space for windows partition

The windows 10 OS itself took up about 20GB. Office will take up another 1.5~2GB. Visual studio installer alone takes up 6GB, and take up some 15-20GB installed.

If you are not planning on doing anything other than development work in Visual Studio, recommend at least 50~60GB of space for the new partition.

Windows Support Software

If you get the error “The Windows Support Software Could Not Be Saved To The Selected Drive”, try only checking the first option and perform 2nd and 3rd later. In my case, I proceeded with the install without downloading the support drivers first, and only came back to MacOS for it after the first boot into windows.

Installing Windows

Visual

If your windows installer complaints that “We couldn’t create a new partition or locate an existing one. For more information, see setup log files”, try resetting your NVRAM:

Reboot your Mac, hold down Control, Option, R and P on the keyboard right after the chime. Anydesk download for desktop windows 7. Keep holding until the Mac reboots and you hear the chime again. After that complete the BCA procedure as normal.

(Referenced from last page of https://discussions.apple.com/thread/7020233?start=45&tstart=0)

Install boot camp support software on windows

Macbook

Go to your USB drive and look for a bootcamp folder or similar. You should see a setup.exe inside. Run it.
If you get a “The version of Boot Camp is not intended for this computer model”, you may have manually downloaded a version via apple’s website. Those are meant for widows 7 and earlier, so reboot into MacOS and use the boot camp assistant to download the right version.

Stuck at Realtek?

If your set up stucks on “Realtek Audio”, try these to work around:

  1. Keep the installer running (do not force quit)
  2. go to your bootcamp folder, manually install the realtek driver, at the end of the install, do not restart
  3. after manually setting up realtek, open Task Manager, and kill the “RealtekSetup” process
  4. bootcamp will now skip the Realtek step and proceed.

(Referenced from https://discussions.apple.com/thread/6567790?tstart=0 )

In Windows land

Configuring keyboard and trackpad

Access the boot camp control panel from the status area (right most of the task bar), it’s the grey diamond icon. Click on it once then select “Boot Camp Control Panel”

Select the options you need in the “Keyboard” and “Trackpad” tabs in the new window.
Want to use the command key as ctrl? Download sharp keys from http://www.randyrants.com/category/sharpkeys/

Installing Visual Studio

To mount the iso, select the iso file in explorer, and a new menu “Disc Image Tools” should appear. Clicking on it should give you 2 options “Mount” or “Burn”. Select “Mount” and run the set up application at the root of the disc (mine was “vs_enterprise.exe”).

Select custom installation so you can select the components you need. For me I enabled “SQL Server Data Tools” and some Git tools under “Common Tools”. If you are also doing frontend development, you can install node.js here too.
Enable any mobile-related components and the installation size jumps to 30+ GB as it auto-selects windows SDK and Android Native Development Kit (taking up about 5GB each) among others.

Install IIS

Open the “Programme and features” section of control panel and stay tuned for Part 2!

As a .NET developer, I’ve spent most of my time coding on Windows machines. It’s only logical: Visual Studio is the richest development experience for building C# and VB.NET applications, and it only runs on Windows…right?

When I joined Stormpath to work on our open-source .NET authentication library, I was handed a MacBook Pro and given an interesting challenge: can a Mac be an awesome .NET development platform?

To my surprise, the answer is yes! I’ll share how I turned a MacBook Pro into the ultimate Visual Studio development machine.

How to Run Visual Studio on a Mac

Visual

Visual Studio doesn’t run natively on OS X, so my first step was to get Windows running on my MacBook Pro. (If you want an editor that does run natively, Xamarin Studio or Visual Studio Code might fit the bill).

There are multiple options for running Windows on a Mac. Every Mac comes with Apple’s Boot Camp software, which helps you install Windows into a separate partition. To switch between OSes, you need to restart.

Parallels is a different animal: it runs Windows (or another guest OS) inside a virtual machine. This is convenient because you don’t have to restart your computer to switch over to Windows. Instead, Windows runs in an OS X application window.

I found that a combination of both worked best for me. I installed Windows into a Boot Camp partition first, and then turned that partition into an active Parallels virtual machine. This way, I have the option of using Windows in the virtual machine, or restarting to run Windows natively at full speed.

I was initially skeptical of the performance of a heavy application like Visual Studio running in a virtual machine. The option to restart to Windows via Boot Camp gave me a fallback in case Visual Studio was sluggish.

There are some minor disadvantages to this method: you can’t pause the virtual machine or save it to a snapshot. A non-Boot Camp virtual machine doesn’t have these limitations. This guide will work regardless of what type of virtual machine you create.

After three months of serious use, and some tweaks, I’ve been very impressed with Parallels’ performance. I haven’t needed to boot directly to Windows at all. (For comparison, my host machine is a 15” mid-2015 MacBook Pro with 16GB of RAM and a 1TB flash drive.)

In the remainder of this guide, I’ll detail the steps I took to optimize both Parallels and Visual Studio to run at peak performance.

Installing Windows With Boot Camp and Parallels

This part’s easy. I followed Apple’s Boot Camp guide to install Windows in a separate partition.

ProStudio

Then, I installed Parallels and followed the Parallels Boot Camp guide to create a new virtual machine from the existing Boot Camp partition.

Tweaking Parallels for Performance and Usability

The Parallels team publishes guidelines on how to maximize the performance of your virtual machine. Here’s what I adopted:

Virtual machine settings:

  • 2 virtual CPUs
  • 4096MB system memory
  • 256MB graphics memory

Parallels options:

  • Optimization: Faster virtual machine, Adaptive hypervisor, Tune Windows for speed all turned on.
  • Sharing: Shared cloud, SmartMount, and Access Windows folders from Mac turned off, as I didn’t need these for my workflow.

Download weather app for mac. I experimented with both of Parallels’ presentation modes, Coherence and Full Screen. While it was cool to see my Windows apps side-by-side with OS X in Coherence mode, I found that the UI responsiveness (especially opening and closing windows and dialogs) felt sluggish.

Because of this, I use Full Screen exclusively now. I have Windows full-screen on my external Thunderbolt display, and OS X on my laptop. If I need to use OS X on my large monitor, I can swipe the Magic Mouse to switch desktops.

Adjusting OS X and Windows Features

I fixed a few annoyances and performance drains right off the bat:

  • Function keys. If you’re using the Mac keyboard, you’ll want to change the function key behavior so the F1-F12 keys work correctly in Visual Studio. From System Preferences – Keyboard, make sure Use all F1, F2, etc. keys as standard function keys is checked. With this turned on, hold Fn to use the Mac functions (brightness, volume, etc.) on F1-F12. With an external non-Mac keyboard, this isn’t an issue.
  • Start menu. I’m using Windows 8, and the removal of the Start menu annoyed me. I clung to my old ways and installed Start8 to restore it.

  • Disable Windows visual effects. I turned off most of the Windows desktop manager visual effects by going to Control Panel – System and Security – Advanced system settings – Advanced – Performance – Settings – Visual Effects and choosing Adjust for best performance. However, I left Smooth edges of screen fonts checked because it improves text rendering on my monitor.

Installing Visual Studio and Helpful Extensions

Installing Visual Studio is a piece of cake once the virtual machine is set up. I simply downloaded the latest release from MSDN and let the installer run.

Macbook Pro For Visual Studio Development

If you use an Apple Magic Mouse (as I do), Visual Studio tends to be overly eager to zoom the text size in and out as you swipe your finger over the mouse. The Disable Mouse Wheel Zoom add-on fixes this annoyance.

Improving Visual Studio for Performance

I was impressed with how well Visual Studio performed under emulation. With a large multi-project solution open, though, I saw some slowdowns.

Through trial and error, I found a number of things that could be disabled to improve performance. You may not want to make all of the changes I did, so pick and choose your own list of tweaks:

  • Disable hardware-accelerated rendering. Unchecking Automatically adjust visual experience based on client performance, Enable rich client visual experience, and Use hardware graphics acceleration if available via Options – Environment made the UI feel much more responsive on my machine.
  • Start up to an empty environment. Starting up Visual Studio for the first time feels a lot snappier if you skip the default news page on startup. Select Empty environment under Options – Environment – Startup – At startup.

  • Remove unused extensions. Visual Studio ships with a number of extensions that you may not need. From Tools – Extensions and Updates – Installed, remove any extensions you aren’t actively using (you can always reinstall them later). I got rid of six extensions I didn’t need.

  • Disable extra debugging features. I turned off both Enable Diagnostic Tools while debugging and Show elapsed time PerfTip while debugging in Options – Debugging – General. I wasn’t using these debugging features, and debugging felt snappier after I disabled them.

  • Turn off the Navigation Bar. I found the code editor Navigation Bar to be unnecessary if the Solution Explorer is open. I disabled it via Options – Text Editor – All Languages – Navigation Bar.

  • Disable CodeLens. CodeLens is a cool feature for collaboration, but it’s not part of my current workflow. I got rid of the CPU overhead by turning it off via Options – Text Editor – All
    Languages – CodeLens – Enable CodeLens.

  • Turn off Track Changes. When a file is open in the code editor, Visual Studio will represent recent changes by displaying small regions of green or yellow on the scroll bar. If you can live without this, turn off Track changes via Options – Text Editor – General for a small performance boost.

  • Turn off Track Active Item. Squeeze out a little bit more UI performance out by ensuring Track Active Item in Solution Explorer is unchecked under Options – Projects and Solutions – General.

Visual Studio on a Mac: The Best of Both Worlds

With these tweaks, I’ve come to love using Visual Studio on a Mac. The performance is good, and by running Windows in a virtual machine, I get the best of both OS worlds.

Macbook Pro Visual Studio 2015

Want to see what I’m building with this setup? Check out our open-source .NET SDK on Github.

Macbook Pro M1 Visual Studio

Do you have any other tricks you’ve used to improve Visual Studio performance? Any must-have add-ons that boost your productivity? Leave me a comment below!