Prerequisites for .NET Core on macOS

This article shows you the supported macOS versions and .NET Core dependencies that you need to develop, deploy, and run .NET Core applications on macOS machines. The supported OS versions and dependencies that follow apply to the three ways of developing .NET Core apps on a Mac: via the command-line with your favorite editor, Visual Studio Code, and Visual Studio for Mac.

Supported macOS versions

.NET Core 2.x is supported on the following versions of macOS:

  • macOS 10.12 "Sierra" and later versions

See .NET Core 2.x Supported OS Versions for the complete list of .NET Core 2.x supported operating systems, out of support OS versions, and lifecycle policy links.

.NET Core dependencies

Download and install the .NET Core SDK from .NET Downloads. If you have problems with the installation on macOS, consult the Known issues topic for the version you have installed.

Increase the maximum open file limit

The default open file limit on macOS may not be sufficient for some .NET Core workloads, such as restoring projects or running unit tests.

You can increase this limit by following these steps:

  1. Using a text editor, create a new file /Library/LaunchDaemons/limit.maxfiles.plist, and save the file with this content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
<plist version="1.0">
  1. In a terminal window, run the following command:
echo 'ulimit -n 2048' | sudo tee -a /etc/profile
  1. Reboot your Mac to apply these settings.

Visual Studio for Mac

You can use any editor to develop .NET Core applications using the .NET Core SDK. However, if you want to develop .NET Core applications on a Mac in an integrated development environment, you can use Visual Studio for Mac.

.NET Core development on macOS with Visual Studio for Mac requires:

  • A supported version of the macOS operating system
  • OpenSSL (.NET Core 1.x only; .NET Core 2.x uses security services available natively in macOS)
  • .NET Core SDK for Mac
  • Visual Studio for Mac