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?
Extension for Visual Studio - Enables auto formatting of the code when you save a file. Visual Studio supports auto formatting of the code with the CTRL+E,D or CTRL+E,F key shortcuts but with this extension the VS command 'Format Document' is executed on Save. We would want to have Visual Studio 2005 working on a local copy of a SVN repository; this local copy has been checked out by Mac OS X (and updates and commits will only be made under Mac OS X, so no problem with that), and as a consequence the end of lines are UNIX. Yes, you very well can learn C using Visual Studio. Visual Studio comes with its own C compiler, which is actually the C++ compiler. Just use the.c file extension to save your source code. You don't have to be using the IDE to compile C. Visual Studio comes with its own C compiler, which is actually the C++ compiler. Just use the.c file extension to save your source code. You don't have to be using the IDE to compile C.
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 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.
Visual Studio For Mac FreeAdjusting OS X and Windows Features
I fixed a few annoyances and performance drains right off the bat:
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.
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:
Visual Studio For Mac Os X
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.
Want to see what I’m building with this setup? Check out our open-source .NET SDK on Github.
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!
Hi there mhutch, this issue appears to have regressed:
Visual Studio Enterprise 2017 for Mac
Version 7.3 (build 797) Installation UUID: 39922d5e-a216-400f-9782-375c75340169 Runtime: Mono 5.4.1.7 (2017-06/e66d9abbb27) (64-bit) GTK+ 2.24.23 (Raleigh theme)
NuGet
Version: 4.3.1.4445
.NET Core
Runtime: /usr/local/share/dotnet/dotnet Runtime Version: 2.0.0 SDK: /usr/local/share/dotnet/sdk/2.0.0/Sdks SDK Version: 2.0.0 MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.4.1/lib/mono/msbuild/15.0/bin/Sdks
Xamarin.Profiler
Version: 1.6.0 Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
Apple Developer Tools
Xcode 9.2 (13772) Build 9C40b
Xamarin.iOS
Version: 11.4.0.214 (Visual Studio Enterprise) Hash: c4240f3f Branch: d15-5 Build date: 2017-11-08 17:28:18-0500
Xamarin.Android
Version: 8.1.0.24 (Visual Studio Enterprise) Android SDK: /Users/alangley/Library/Developer/Xamarin/android-sdk-macosx Supported Android versions: 4.0.3 (API level 15) 4.4 (API level 19) 6.0 (API level 23) 7.1 (API level 25) 8.0 (API level 26)
SDK Tools Version: 25.2.5
SDK Platform Tools Version: 26.0.1 SDK Build Tools Version: 25.0.3
Java SDK: /usr
java version '1.8.0_131' Java(TM) SE Runtime Environment (build 1.8.0_131-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode) Visual Studio For Mac Save As Command
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
Xamarin.Mac
Version: 4.0.0.214 (Visual Studio Enterprise) X Code
Xamarin Inspector
Version: 1.3.2 Hash: 461f09a Branch: 1.3-release Build date: Tue, 03 Oct 2017 18:26:57 GMT Client compatibility: 1 Visual Studio For Mac Download
Build Information
Release ID: 703000797 Git revision: ff055b3ecaaeb4229434d0ca871c7d67c62f6388 Build date: 2017-11-30 14:34:51-05 Xamarin addins: 351fc12d4f2367490f8fc2a66b14690d825bb7f1 Build lane: monodevelop-lion-d15-5
Operating System
Mac OS X 10.13.1 Darwin 17.2.0 Darwin Kernel Version 17.2.0 Fri Sep 29 18:27:05 PDT 2017 root:xnu-4570.20.62~3/RELEASE_X86_64 x86_64
Enabled user installed addins
AddinMaker 1.4.1 Internet of Things (IoT) development (Preview) 7.1 Comments are closed.
|
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |