Visual Studio Macos



-->

To start developing native, cross-platform .NET apps on macOS, install Visual Studio 2019 for Mac following the steps below.

Requirements

  • A Mac with macOS High Sierra 10.13 or above.

To build Xamarin apps for iOS or macOS, you'll also need:

Studio
  • A Mac that is compatible with the latest version of Xcode. See Apple's minimum requirements documentation
  • The latest version of Xcode. It may be possible to use an older version of Xcode if your Mac is not compatible with the latest version.
  • An Apple ID. If you don't have an Apple ID already you can create a new one at https://appleid.apple.com. It's necessary to have an Apple ID for installing and signing into Xcode.

Installation instructions

  1. Download the installer from the Visual Studio for Mac download page.

  2. Once the download is complete, click the VisualStudioforMacInstaller.dmg to mount the installer, then run it by double-clicking the arrow logo:

  3. You may be presented with a warning about the application being downloaded from the Internet. Click Open.

  4. Wait while the installer checks your system:

  5. An alert will appear asking you to acknowledge the privacy and license terms. Follow the links to read them, then press Continue if you agree:

  6. The list of available workloads is displayed. Select the components you wish to use:

    If you do not wish to install all platforms, use the guide below to help you decide which platforms to install:

    Type of AppTargetSelectionNotes
    Apps Using XamarinXamarin.FormsSelect Android and iOS platformsYou will need to install Xcode
    iOS onlySelect iOS platformYou will need to install Xcode
    Android onlySelect Android platformNote that you should also select the relevant dependencies
    Mac onlySelect macOS (Cocoa) platformYou will need to install Xcode
    .NET Core applicationsSelect .NET Core platform.
    ASP.NET Core Web ApplicationsSelect .NET Core platform.
    Azure FunctionsSelect .NET Core platform.
    Cross-platform Unity Game DevelopmentNo additional platforms need to be installed beyond Visual Studio for Mac.Refer to the Unity setup guide for more information on installing the Unity extension.
  7. After you have made your selections, press the Install button.

  8. The installer will display progress as it downloads and installs Visual Studio for Mac and the selected workloads. You will be prompted to enter your password to grant the privileges necessary for installation.:

  9. Once installed, Visual Studio for Mac will prompt you to personalize your installation by signing in and selecting the key bindings that you'd like to use:

In this video I show you How to Install Visual Studio on MacOS. In this blog post, you’ll learn how to create your first macOS app in C#: a Pomodoro timer to keep us productive. Getting Started with macOS. Building apps for macOS start just like any other application, with File New. Note that you’ll need to have Xamarin.Mac installed on your macOS device; building macOS apps from Visual Studio is.

If you have network trouble while installing in a corporate environment, review the installing behind a firewall or proxy instructions.

Learn more about the changes in the release notes.

Note

Macos

If you chose not to install a platform or tool during the original installation (by unselecting it in step #6), you must run the installer again if you wish to add the components later.

Install Visual Studio for Mac behind a firewall or proxy server

To install Visual Studio for Mac behind a firewall, certain endpoints must be made accessible in order to allow downloads of the required tools and updates for your software.

Configure your network to allow access to the following locations:

Next steps

Installing Visual Studio for Mac allows you to start writing code for your apps. The following guides are provided to guide you through the next steps of writing and deploying your projects.

iOS

  1. Device Provisioning(To run your application on device).

Android

Xamarin.Forms

Build native cross-platform applications with Xamarin.Forms:

.NET Core apps, ASP.NET Core web apps, Unity game development

For other Workloads, refer to the Workloads page.

Related Video

See also

-->

You can use this guide to uninstall each component in Visual Studio for Mac individually by navigating to the relevant section, or you can use the scripts provided in the Uninstall Script section to uninstall everything.

Note

This information will only remove Visual Studio 2019 or 2017 for Mac from your machine. to uninstall Visual Studio Code, see this issue for details.

Uninstall Script

There are two scripts that can be used to uninstall Visual Studio for Mac and all components for your machine:

The following sections provide information on downloading and using the scripts.

Visual Studio for Mac and Xamarin script

You can uninstall Visual Studio and Xamarin components in one go by using the uninstall script.

This uninstall script contains most of the commands that you will find in the article. There are three main omissions from the script and are not included due to possible external dependencies. To remove this, jump to the relevant section below and remove them manually:

To run the script, do the following steps:

  1. Right-click on the script and select Save As to save the file on your Mac.

  2. Open Terminal and change the working directory to where the script was downloaded:

  3. Make the script executable and the run it with sudo:

  4. Finally, delete the uninstall script and remove Visual Studio for Mac from the dock (if it's there).

.NET Core script

The uninstall script for .NET Core is located in the dotnet cli repo

To run the script, do the following steps:

  1. Right-click on the script and select Save As to save the file on your Mac.

  2. Open Terminal and change the working directory to where the script was downloaded:

  3. Make the script executable and the run it with sudo:

  4. Finally, delete the .NET Core uninstall script.

Uninstall Visual Studio for Mac

The first step in uninstalling Visual Studio from a Mac is to locate Visual Studio.app in the /Applications directory and drag it to the Trash Can. Alternatively, right-click and select Move to Trash as illustrated in the following image:

Deleting this app bundle removes Visual Studio for Mac, even though there may be other files related to Xamarin still on the file system.

To remove all traces of Visual Studio for Mac, run the following commands in Terminal:

You may also want to remove the following directory containing various Xamarin files and folders. However, before you do you should be aware that this directory contains the Android signing keys. For more information refer to the section Uninstalling Android SDK and Java SDK:

Uninstall Mono SDK (MDK)

Mono is an open-source implementation of Microsoft's .NET Framework and is used by all Xamarin Products—Xamarin.iOS, Xamarin.Android, and Xamarin.Mac to allow development of these platforms in C#.

Warning

There are other applications outside of Visual Studio for Mac that also use Mono, such as Unity.Be sure that there are no other dependencies on Mono before uninstalling it.

To remove the Mono Framework from a machine, run the following commands in Terminal:

Uninstall Xamarin.Android

There are a number of items required for the installation and use of Xamarin.Android, such as the Android SDK and Java SDK.

Use the following commands to remove Xamarin.Android:

Visual Studio Macos

Uninstall Android SDK and Java SDK

The Android SDK is required for development of Android applications. To completely remove all parts of the Android SDK, locate the file at ~/Library/Developer/Xamarin/ and move it to Trash.

Warning

You should be aware that Android signing keys that are generated by Visual Studio for Mac are located in ~/Library/Developer/Xamarin/Keystore. Make sure to back these up appropriately, or avoid removing this directory if you wish to keep your keystore.

The Java SDK (JDK) does not need to be uninstalled, as it is already pre-packaged as part of Mac OS X / macOS.

Uninstall Android AVD

Warning

There are other applications outside of Visual Studio for Mac that also use Android AVD and these additional android components, such as Android Studio.Removing this directory may cause projects to break in Android Studio.

To remove any Android AVDs and additional Android components use the following command:

To remove only the Android AVDs use the following command:

Uninstall Xamarin.iOS

Xamarin.iOS allows iOS application development using C# or F# with Visual Studio for Mac.

Use the following commands in Terminal to remove all Xamarin.iOS files from a file system:

Uninstall Xamarin.Mac

Xamarin.Mac can be removed from your machine using the following two commands to eradicate the product and license from your Mac respectively:

Uninstall Workbooks and Inspector

Studio

Starting with 1.2.2, Xamarin Workbooks & Inspector can be uninstalled from a terminal by running:

For older versions, you need to manually remove the following artifacts:

Visual Studio Macos Arm

  • Delete the Workbooks app at '/Applications/Xamarin Workbooks.app'
  • Delete the Inspector app at 'Applications/Xamarin Inspector.app'
  • Delete the add-ins: '~/Library/Application Support/XamarinStudio-6.0/LocalInstall/Addins/Xamarin.Interactive' and '~/Library/Application Support/XamarinStudio-6.0/LocalInstall/Addins/Xamarin.Inspector'
  • Delete Inspector and supporting files here: /Library/Frameworks/Xamarin.Interactive.framework and /Library/Frameworks/Xamarin.Inspector.framework

Uninstall the Xamarin Profiler

Uninstall the Visual Studio Installer

Use the following commands to remove all traces of the Xamarin Universal Installer:

Uninstall Visual Studio 2019 for Mac Preview

Visual Studio 2019 for Mac Preview was launched as a separate preview, allowing you to continue to work with your Visual Studio 2017 for Mac install side-by-side.

Visual Studio Mac Os X

Macos

Now that Visual Studio 2019 for Mac has been released, you can now safely remove the Visual Studio 2019 for Mac Preview application.

To uninstall the preview application bundle, select Visual Studio (Preview) from your Applications folder and click Move to Trash, as depicted in the following image:

You can also remove the Preview plist file with the following command:

Visual Studio Macos Python

See also