macOS 上 .NET Core 的先决条件Prerequisites for .NET Core on macOS

本文介绍了在 macOS 计算机上开发、部署和运行 .NET Core 应用程序所需的受支持的 macOS 版本和 .NET Core 依赖项。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. 支持的操作系统版本和随附的依赖项适用于在 Mac 上开发 .NET Core 应用的三种方法:结合使用常用编辑器和命令行Visual Studio CodeVisual Studio for MacThe 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.

下载和依赖项Downloads and dependencies

.NET Core 3.0 在 macOS High Sierra(版本 10.13)及更高版本上受支持 。.NET Core 3.0 is supported on macOS High Sierra (version 10.13) and later versions. 需要 x64 CPU 体系结构 。A x64 CPU architecture is required.

.NET Core 3.0 下载页面下载并安装 .NET Core SDK。Download and install the .NET Core SDK from the .NET Core 3.0 downloads page. 要在完整列表中了解 .NET Core 3.0 支持的操作系统、发行版本和版本、生命周期策略链接和不支持的 OS 版本,请参阅 .NET Core 3.0 支持的 OS 版本.NET Core 3.0 Supported OS Versions for the complete list of .NET Core 3.0 supported operating systems, distributions and versions, out of support OS versions, and lifecycle policy links.

有关已知问题的列表,请参阅 .NET Core 已知问题For a list of known issues, see .NET Core known issues.

libgdipluslibgdiplus

使用 System.Drawing.Common 程序集的 .NET Core 应用程序要求安装 libgdiplus。.NET Core applications that use the System.Drawing.Common assembly require libgdiplus to be installed.

获取 libgdiplus 的一个简单方法是使用适用于 macOS 的 Homebrew (“brew”) 包。An easy way to obtain libgdiplus is by using the Homebrew ("brew") package manager for macOS. 在安装 brew 后,通过在终端(命令)提示符处执行以下命令来安装 libgdiplus :After installing brew, install libgdiplus by executing the following commands at a Terminal (command) prompt:

brew update
brew install libgdiplus

Visual Studio for MacVisual Studio for Mac

可以使用任何编辑器,通过 .NET Core SDK 开发 .NET Core 应用程序。You can use any editor to develop .NET Core applications using the .NET Core SDK. 但是,若要在集成的开发环境中的 Mac 上开发 .NET Core 应用程序,可以使用 Visual Studio for MacHowever, if you want to develop .NET Core applications on a Mac in an integrated development environment, you can use Visual Studio for Mac.