.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.0.NET Core 3.0

最新版是 .NET Core 3.0。The latest version is .NET Core 3.0. 新功能包括通过 Windows Presentation Foundation (WPF) 和 Windows 窗体提供的 Windows 桌面支持、使用 Blazor 进行全栈 C# Web 开发、SignalR 和 Azure SignalR 服务的新增强功能、C# 8 的新增 C# 语言功能等等。New features include Windows Desktop support with Windows Presentation Foundation (WPF) and Windows Forms, full stack C# web development with Blazor, new enhancements to SignalR and Azure SignalR Service, new C# language features with C# 8, and much more. 有关 .NET Core 3.0 新增功能的完整列表,请参阅 .NET Core 3.0 的新增功能For a full listing of the new features in .NET Core 3.0, see What's new in .NET Core 3.0.

创建首个应用程序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!

支持Support

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.