Introducing Visual Studio for Mac
The Integrated Development Environment for Mac
Let us know how you feel about this
last updated: 2016-11
This document provides an overview of Visual Studio, the Integrated Development Environment (IDE) used to create iOS, Mac and Android applications on macOS. It presents the functionality that makes it an excellent tool for creating native mobile and desktop applications on the Xamarin platform.
The preview version of Visual Studio for Mac evolves Xamarin's mobile-centric IDE, Xamarin Studio, into a mobile-first, cloud-first development on the Mac. This developer-focused tool allows you to leverage the power of .NET to create applications for all platforms required by your users.
The UX of Visual Studio for Mac is similar to its Windows counterpart, but with a native macOS feel. Creating, opening, and developing app will be a familiar experience for anyone who has previously used Visual Studio on Windows. In addition, Visual Studio for Mac employs many of the powerful tools that makes its Windows counterpart such a powerful IDE. For example the Roslyn Compiler Platform is used for refactoring and IntelliSense. Its project system and build engine use MSBuild; and its source editor supports TextMate bundles. It uses the same debugger engines for Xamarin and .NET Core apps, and the same designers for Xamarin.iOS and Xamarin.Android.
This article explores various sections of Visual Studio, providing a look at some of the features that make it a powerful tool for creating applications.
Visual Studio for Mac is currently available on Mac OS X 10.11 and above. For Xamarin development there are additional requirements listed on the System Requirements page.
Visual Studio for Mac allows for development of the following platforms:
- Xamarin.iOS (including WatchOS, and tvOS)
- Xamarin.Forms (iOS and Android only)
Side by Side Installation with Xamarin Studio
Visual Studio for Mac Preview can be installed side by side with Xamarin Studio.
However, Visual Studio for Mac requires Mono 4.8, and installing or updating the stable or beta version of Xamarin Studio will downgrade Mono to an older version.
You can work around this by switching Xamarin Studio to the alpha update channel, or by opting out of Mono 4.6 downgrades in the Xamarin Studio update dialog. If you need to reinstall Mono 4.8, you can get it here.
To Install Visual Studio for Mac preview, do the following:
Download the unified installer from here.
Once the installer is downloaded, run it by double-clicking on the logo, as illustrated below:
You may be prompted with an alert dialog similar to the image below. In this case, click Open:
The installation requires you to review and accept the term and conditions and Privacy Statement in order to proceed. To do this, select the checkbox and press Continue:
Next, the installer will inspect the system to determine which required components are missing and need to be downloaded and installed. You can select which products you wish to download here:
After identifying missing components, the Xamarin installer will download and execute the installers for the platform dependencies, as shown in the screenshots below. The Android SDK installation location can be configured here, if you choose to also install Xamarin.Android at this time:
If you have selected to install Xamarin.iOS at this time, you will be prompted to install Xcode, if it is not installed on your machine already. The link in the dialog will bring you to the Mac App Store, from here you can download Xcode as a seperate process to the Visual Studio install:
The installer will then show the items to be downloaded and installed; click on Continue to start the this process:
If you have chosen to install Xamarin.Android, you will have to accept the Java SDK and Android SDK Software Licensing Agreements before beginning the download:
To do this select Accept Licenses, and click Continue:
The Xamarin unified installer will start the download and install process of the selected items:
Be aware that during this part of the installation, you may be prompted to elevate the permissions necessary for individual components that are needed to complete installation.
To begin developing a on Visual Studio for Mac click the Start Visual Studio button:
Installing .NET Core
Visual Studio for Mac includes support for .NET Core – a lightweight runtime allowing for cross-platform development across Windows, macOS, and Linux. .NET Core needs to be installed when using Visual Studio for Mac. To install it, do the following:
Before you start installing .NET Core, ensure that you have updated all OS updates to the latest stable version. You can check this by going to the App Store application, and selecting the Updates tab.
Follow the steps listed on the .NET Core site
Make sure to complete all four steps successfully to ensure that .NET Core is installed successfully.
Visual Studio for Mac Preview is available to all users
To sign in to Visual Studio for Mac, do the following:
Click the Sign in link on the Welcome page to display the Accounts Dialog, and press the Sign In button:
Enter your Microsoft Credentials:
Note that you can not use Xamarin Credentials to log into Visual Studio for Mac.
Once you have loged in successfully, you will see your license type. From this dialog, you can additional microsoft accounts that you may wish you use:
As with all preview versions of our products, we appreciate all contructive feedback from users. There are a number of ways you can provide feedback to the team on Visual Studio for Mac:
Help > Report Problem will direct you to the bugzilla web page. This is used to file all bugs.
You can also Provide a Suggestion via the Welcome Page on Visual Studio for Mac:
Visual Studio for Mac shares lots of the same features as Xamarin Studio such as C# and F# language support and iOS and Android Visual Designers. All documentation for written Xamarin Studio is still relevant. Visual Studio for Mac provides
When launched, Visual Studio for Mac displays a Welcome Screen, as illustrated below:
The Welcome screen contains the following sections:
- Toolbar – Provides quick access to search bar. When a solution is loaded, this is used to set app configurations, debugging, and displaying errors.
- Getting Started – Provides quick access to a number of useful topics for developers Getting Started with Visual Studio for Mac.
- Recent Solutions – Provides quick access to recently opened solutions, as well as convenient buttons to open or create projects.
- Developer News – News feed to stay up to date on the latest Microsoft Developer information.
Solutions and Projects
The image below shows Visual Studio for Mac with an application loaded:
The following sections provide an overview of the major areas in Visual Studio for Mac.
The Solution Pane organizes the project(s) in a solution, as shown below:
This is where files for the source code, resources, user interface, and dependencies are organized into platform-specific Projects.
For more information on using Projects, Solutions, and Configurations in the IDE, refer to the Projects, Solutions, and Configurations guide.
Assembly references for each project are available under the References folder, shown below:
Additional references can be added via the the Edit References dialog, which can be displayed by double-clicking on the References folder, or by select Edit References on its context menu actions:
All external dependencies used in your app are stored in the Dependencies folder. These are usually provided in the form of a NuGet or Component.
NuGet is the most popular package manager for .NET development. With Visual Studio's NuGet support you can easily search for and add packages to your project to application.
To a dependencies your application, right click on the dependencies folder, and select Add Packages:
Information on using a NuGet package in an application can be found in the Including a NuGet in your project guide.
Visual Studio for Mac provides two useful ways to refactor your code: Context Actions, and Source Analysis. You can read more about them in the Refactoring guide.
Visual Studio for Mac has a native debugger allowing debugging support for Xamarin.iOS, Xamarin.Mac and Xamarin.Android applications. Visual Studio for Mac uses the Mono Soft Debugger, which is implemented into the Mono runtime allowing the IDE to debug managed code across all platforms. For additional information on debugging, visit the Debugging with Xamarin guide.
The debugger contains rich visualizers for special types such as strings, colors, URLs as well as the sizes, co-ordinates and bézier curves.
For more information on the debugger's data visualizations visit the Data Visualizations guide.
Visual Studio integrates with Git and Subversion source control systems. Projects under source control are denoted with the branch listed next to the Solution name:
Files with uncomitted changed have an annotation on their icons in the Solution Pane, as shown below:
For more information on using version control in Visual Studio, refer to the Version Control guide.
This document introduced the capabilities of Visual Studio for, which enable you to start making beautiful cross platform applications. For a more in depth review of Visual Studio for Mac's features, refer to the Xamarin Studio Tour guide