.NET Core 指南.NET Core guide

.NET Core开放源代码通用开发平台,由 Microsoft 和 .NET 社区在 GitHub 上共同维护。.NET Core is an open-source, general-purpose development platform maintained by Microsoft and the .NET community on GitHub. 它跨平台(支持 Windows、macOS 和 Linux),并且可用于生成设备、云和 IoT 应用程序。It's cross-platform (supporting Windows, macOS, and Linux) and can be used to build device, cloud, and IoT applications.

请参阅关于 .NET Core,详细了解 .NET Core,包括它的特征、支持的语言和框架以及关键 API。See About .NET Core to learn more about .NET Core, including its characteristics, supported languages and frameworks, and key APIs.

请学习 .NET Core 教程,了解如何创建简单的 .NET Core 应用程序。Check out .NET Core Tutorials to learn how to create a simple .NET Core application. 只需几分钟即可生成并运行第一个应用。It only takes a few minutes to get your first app up and running. 若要尝试在浏览器中使用 .NET Core,请参阅 C# 中的数字在线教程。If you want to try .NET Core in your browser, look at the Numbers in C# online tutorial.

下载 .NET CoreDownload .NET Core

下载 .NET Core SDK,以尝试在 Windows、macOS 或 Linux 计算机上使用 .NET Core。Download the .NET Core SDK to try .NET Core on your Windows, macOS, or Linux machine. 如果首选使用 Docker 容器,请访问 .NET Core Docker HubAnd if you prefer to use Docker containers, visit the .NET Core Docker Hub.

若要使用其他版本 .NET Core,可以在 .NET Core 下载内容中找到所有版本 .NET Core。All .NET Core versions are available at .NET Core Downloads if you're looking for another .NET Core version.

.NET Core 3.1.NET Core 3.1

最新版是 .NET Core 3.1。The latest version is .NET Core 3.1. 3.1 版在 .NET Core 3.0 版的基础上进行了少许改进,但 .NET Core 3.1 版是长期支持的版本3.1 includes minor improvements over .NET Core 3.0, however, .NET Core 3.1 is a long-term supported release. 有关 .NET Core 3.1 版本的详细信息,请参阅 .NET Core 3.1 的新增功能For more information about the .NET Core 3.1 release, see What's new in .NET Core 3.1.

创建首个应用程序Create your first application

安装 .NET Core SDK 后,打开命令提示符。After installing the .NET Core SDK, open a command prompt. 输入以下 dotnet 命令,创建并运行 C# 应用程序:Enter the following dotnet commands to create and run a C# application:

dotnet new console
dotnet run

您应看到以下输出:You should see the following output:

Hello World!


Microsoft 支持在 Windows、macOS 和 Linux 上使用 .NET Core。.NET Core is supported by Microsoft, on Windows, macOS, and Linux. 它每年会进行多次安全和质量更新(通常每月一次)。It's updated for security and quality several times a year, typically monthly.

.NET Core 二进制发行版是在 Azure 中的 Microsoft 维护服务器上进行生成和测试,并像其他任何 Microsoft 产品一样获得支持。.NET Core binary distributions are built and tested on Microsoft-maintained servers in Azure and supported just like any Microsoft product.

Red Hat 支持在 Red Hat Enterprise Linux (RHEL) 上使用 .NET CoreRed Hat supports .NET Core on Red Hat Enterprise Linux (RHEL). Red Hat 从源中生成 .NET Core,并在 Red Hat 软件集合中提供它。Red Hat builds .NET Core from source and makes it available in the Red Hat Software Collections. Red Hat 和 Microsoft 开展协作,共同确保 .NET Core 能够在 RHEL 上正常运行。Red Hat and Microsoft collaborate to ensure that .NET Core works well on RHEL.