Pool Studio For Mac

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?

PoolTrac swimming pool service management software is a mobile-ready software solution for pool maintenance companies. It includes a service management database, pool service technician tracking, service dispatching, work tracking, pool service billing/invoicing, and ChemTrac Pro pool chemical calculator to increase the efficiency of swimming pool management and maintenance companies. An agent pool administrator joins the agent to an agent pool, and the credentials of the service account (for Windows) or the saved user name and password (for Linux and macOS) are used to initiate communication with TFS. The agent uses these credentials to listen to the job queue.

Mac studio foundation

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).

Pool studio for mac

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:

  • 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.

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.

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

Fl Studio For Mac

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

Visual Studio For Mac

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!

Visual Studio Team Services (formerly Visual Studio Online) and Team Foundation Services 2015 supports a cross-platform build system that allows you to quickly and easily configure builds that run on Windows, Linux, and even OSX. All Visual Studio Team Services accounts come with a free Windows based hosted build agent but Xcode / iOS builds have not had a cloud hosted option. This can be problematic for organizations that would prefer not to manage Macs in their datacenters or for smaller organizations that would prefer not to maintain dedicated Mac hardware for CI.

To resolve this challenge, we’ve partnered with MacinCloud to introduce a VS Team Services / VSO build agent plan. Setup is streamlined and MacinCloud servers come pre-installed with the software you need to get up and running in as few steps as possible. The plan is currently in preview $30/mo per agent with no limits on build hours. While you’ll still need to sign up for the Apple Developer Program to obtain signing certificates and provisioning profiles necessary to build and release your app, a MacinCloud agent can even be used with the free tier of VS Team Services as you are provided one complementary “private” agent slot.

In this blog post we’ll cover how easy it is for you to add a MacinCloud agent to a VS Team Services account and highlight a number of other improvements we’ve made to better support building projects on Macs.

There are just 5 easy steps to get yourself up and running with Mac based builds in VS Team Services.

  1. Sign up for VS Team Services – You can even use MacinCloud with the free tier of VSO!
  2. Sign up for MacinCloud’s VS Team Services / VSO plan and you’ll get access to the VSO/VS Team Services Agent feature in the MacinCloud portal. (For questions, please contact support@macincloud.com).
  3. Next, add your user to the Agent Pool Administrators and Agent Pool Service Accounts groups in VS Team Services.
    1. Go to Account Admin (gear upper right) > Control Panel > Agent Pools tab > All pools
    2. Add your user to Agent Pool Administrators and Agent Pool Service Accounts groups
  4. Create an “Access Token” for the agent in VS Team Services
    1. In VS Team Services, click on your user name in the upper right hand corner > My Profile
    2. Now go to Security > Personal Access Tokens > Add
    3. Give it a name, set the timeout to 1 yr, select All Scopes, and grab the token
    1. Click on Developer > VSO Agent (Preview) and click the edit button on one of the unused agent slots in the list
    2. Enter your VSO domain (https://mydomain.visualstudion.com), the access token you created in step 1, and give it a unique name for your VSO instance and click Save.
    3. You can also use this same screen later to upload any number of certificate and provisioning if needed. However, we’ve got some features that should allow you to skip this step completely for Xcode and Cordova projects!

Important Note: You are provided one complementary “private” agent slot in your VS Team Services / VSO instance for free. This includes any MacinCloud agent. However, the free tier also gives you access to a Hosted Windows agent as well (for a total of 2) and you can purchase additional private slots as needed.

Now that you’re up and running, use VS Team Services to create a build definition for your project!

Xcode & React Native Projects

All VS Team Services instances now have an updated Xcode Build step that provides additional options including the ability to simply reference a certificate and mobile provisioning file in your repository and have the VSO agent handle installing and managing certificates for you. Certs are then managed local to the project to take the guesswork out of certificate management. Perfect for MacinCloud!

Pool Studio For Mac

Setting up the Xcode Build step is pretty self-explanatory, but you can check out the detailed tutorial to see how you can use it to test and publish test results to VS Team Services using xctool and even run tests in MacinCloud with Xcode 7 or up. In addition, if you are new to managing signing and provisioning in a CI environment, we also have a cert management tutorial that can fill you in on the details.

React Native projects can also use this same build step and we’re working to improve setup further. See this blog post for information on current setup steps.

Cordova Projects

A new VS Team Services / VSO extension makes setting up Cordova projects in a CI environment simple. It includes the same cert management features as Xcode Build, caches multiple versions of Cordova for improved performance, and more. These tasks should work with any Cordova CLI compliant project including those created in Tools for Apache Cordova or command line tools like Ionic.

Simply install the VS Team Services Cordova Extension and use the included Cordova or Ionic steps. The build steps are easy to configure, but check out the detailed tutorial for full setup details including using Karma to test your apps.

Xamarin iOS Projects

Currently Xamarin iOS projects require a manual activation of your Xamarin license in MacinCloud and you’ll need to add signing certificates to MacinCloud’s servers through their portal. Follow Xamarin’s Offline Activation steps and work with Xamarin and MacinCloud support to complete your activation.

In the near future you’ll be able to use the Xamarin License build step to activate your license and take advantage of the same signing features available for Xcode and Cordova today.

You are no longer required to manually activate your Xamarin license. Please see https://www.visualstudio.com/en-us/docs/build/apps/mobile/xamarin for the latest documentation.

Summary

We’re committed to making building Xcode and iOS projects in a CI environment easier than ever before with our cloud and on-premises solutions. We hope that you find these improvements and MacinCloud’s great new offering useful. We’re always interested in your feedback on how we can make things even better, so please contact us via UserVoice with your ideas and suggestions! You can also connect with MacinCloud via email or Twitter with any questions, issues, or suggestions you may have for their exciting new offering.

Get started with Visual Studio Team Services and MacinCloud today!

Chris Patterson, Principal Program Manager, Visual Studio Team Services

Chris Patterson is a Principal Program Manager working on Team Foundation Server. Over his career he has worked for a number of different software companies on technologies ranging from Classic ASP and VB through Java and .NET. Currently he is working on bringing the Build automation features of TFS to the cloud.

Chuck Lantz, Senior Program Manager, Visual Studio Client Tools

Chuck spent over 15 years as developer, advocate, and architect in a variety of mid and large scale enterprise IT shops. He brought his passion for app development to Microsoft in 2012 and is currently focused on mobile app development.

David Estey-Ang, Vice President of Operations, Moboware Inc.

David has seven years of operational management experience in finance and technology. Since 2014, David has managed operations and played an integral role in new product development and organizational strategy at MacinCloud, a Moboware Inc. service.