Last month, Microsoft announced the release of Visual Studio for Mac: a full-featured development environment to help developers on the Mac create apps, games, and services for mobile, cloud,. In general terms Visual Studio for Mac is an integrated Macintosh development environment for C# and F# applications that run on iOS, Android, and Mac targets, with a variety of application forms. And in the course Visual Studio Development on a Mac, you'll witness the impact a virtual machine running Windows and Visual Studio has on its host, the Mac OS X. This smooth performance is in the details of Apple's hardware and the cleverness of the virtual machine software.
![]() reader commentswith 60 posters participating
On Wednesday, Microsoft is hosting its Connect() developer conference in New York City, but the company has accidentally let slip a couple of pieces of news a bit early. Posts were published to MSDN Magazine (though they've now been removed) earlier than intended.
The biggest news is that Visual Studio is coming to the Mac—or, at least, a piece of software named Visual Studio is coming to the Mac. Microsoft has always had a surprising willingness to give different products similar names, a move that generally provokes more confusion than it does enlightenment. The same seems true here.
Visual Studio for Mac isn't, in fact, Visual Studio at all. Instead, it's the latest iteration of Xamarin Studio, the cross-platform C# development environment that Microsoft inherited when it bought Xamarin, developers of cross-platform .NET-based mobile development tools, last year.
These are two very different products, and the real Windows Visual Studio is the more capable product. However, the two offerings are less different than they once were. Even without Microsoft's ownership of the company, the Xamarin platform was set to align more closely with the .NET platform thanks to Microsoft's open sourcing efforts: many components that Xamarin had to develop independently could be dropped in favor of the 'real' .NET versions. In particular, the Roslyn C# compiler and MSBuild build tool and project files are shared between real Visual Studio and the new Visual Studio for Mac. The interface designers for building Android and iOS apps using the Xamarin platform are also shared. This means that if a project builds in one, it will build in the other. Thus, developers on different platforms can easily contribute to the same projects; teams can in principle be made of a mix of Windows and Mac developers.
For those wanting something a little lighter weight, Microsoft's other weirdly branded product, Visual Studio Code (which, again, has no real shared heritage with 'Visual Studio'), remains a cross-platform text editor and simple development environment.
MSDN Magazine also spoiled a little snippet of news about the real Visual Studio. Hitherto, the development of the next version of Visual Studio has used the awkward name Visual Studio '15,' quote marks and all. With the current version being 'Visual Studio 2015,' this made it all too easy to stumble and refer to the wrong one by accident. But '15' now has a proper name: it will be 'Visual Studio 2017.' It's still not finished, but a release candidate will be released at the Connect event.
Visual Studio 2017 contains a laundry list of new, incremental improvements to C++, C#, F#, debugging, and more. In some ways, its biggest improvement is not to the core product itself but its installer. Currently installing and updating Visual Studio is a tremendously tedious affair that takes far longer than seems reasonable. Uninstalling is also aggravating, as many of the dependencies have to be removed separately. The new installer promises to be faster, allowing smaller installations that only include the features you need and enabling clean one-shot uninstallation.
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 MacVisual Studio On A Mac
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.
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:
Parallels options:
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:
Installing Visual Studio and Helpful ExtensionsC++ Visual Studio Mac
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.
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.
Visual Studio For Mac Professional
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:
Visual Studio For Mac Os
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.
How To Get C++ On Visual Studio For Mac
Want to see what I’m building with this setup? Check out our open-source .NET SDK on Github.
Development On Visual Studio For Mac Offline Installer
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!
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |