.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 Core 2.2Download .NET Core 2.2

下载 .NET Core 2.2 SDK,以尝试在 Windows、macOS 或 Linux 计算机上使用 .NET Core。Download the .NET Core 2.2 SDK to try .NET Core on your Windows, macOS, or Linux machine. 若要使用 Docker 容器,请访问 dotnet/coreVisit dotnet/core if you prefer to use Docker containers.

若要使用其他版本 .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 2.2.NET Core 2.2

最新版是 .NET Core 2.2The latest version is .NET Core 2.2. 新功能包括:框架依赖部署、启动挂钩、使用 Azure SQL 进行 AAD 身份验证以及对 Windows ARM32 的支持。New features include: framework-dependent deployments, startup hooks, AAD authentication with Azure SQL, and support for Windows ARM32.

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

安装 .NET Core SDK 后,打开命令提示符。After installing the .NET Core SDK, open a command prompt. 键入以下 dotnet 命令以创建并运行 C# 应用程序。Type 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.