.NET Core 使用者入門Get started with .NET Core

本文提供 .NET Core 使用者入門的相關資訊。This article provides information on getting started with .NET Core. .NET Core 可以安裝在 Windows、Linux 和 macOS 上。.NET Core can be installed on Windows, Linux, and macOS. 您可以在慣用的文字編輯器中撰寫程式碼,然後產生跨平台的程式庫和應用程式。You can code in your favorite text editor and produce cross-platform libraries and applications.

如果您不確定 .NET Core 為何,或不確定它與其他 .NET 技術的關聯,請從 What is .NET (什麼是 .NET) 概觀開始。If you're unsure what .NET Core is, or how it relates to other .NET technologies, start with the What is .NET overview. 簡單來說,.NET Core 是 .NET 的開放原始碼跨平台實作。Put simply, .NET Core is an open-source, cross-platform implementation of .NET.

建立應用程式Create an application

首先,在您的電腦上下載並安裝 .NET Core SDKFirst, download and install the .NET Core SDK on your computer.

接下來,開啟終端機,例如 PowerShell命令提示字元bashNext, open a terminal such as PowerShell, Command Prompt, or bash. 鍵入下列 dotnet 命令以建立並執行 C# 應用程式。Type the following dotnet commands to create and run a C# application.

dotnet new console --output sample1
dotnet run --project sample1

您應該會看到下列輸出:You should see the following output:

Hello World!

恭喜您!Congratulations! 您已建立簡單的 .NET Core 應用程式。You've created a simple .NET Core application. 您也可以使用 Visual Studio CodeVisual Studio (僅限 Windows) 或 Visual Studio for Mac (僅限 macOS) 建立 .NET Core 應用程式。You can also use Visual Studio Code, Visual Studio (Windows only), or Visual Studio for Mac (macOS only), to create a .NET Core application.


遵循這些逐步教學課程就可以開始開發 .NET Core 應用程式。You can get started developing .NET Core applications by following these step-by-step tutorials.

如需支援的 Windows 版本清單,請參閱 Windows 開發的必要條件一文。See the Prerequisites for Windows development article for a list of the supported Windows versions.