Installing the .NET SDK

View saved

Install the SDK

Download the current LTS .NET SDK from microsoft.com/net, or use your operating system package manager. The SDK includes the dotnet command.

Check the version

Open a new terminal after installing.

dotnet --version
dotnet --list-sdks

Create a sample app

The CLI can scaffold a console project to prove the install works.

dotnet new console -n HelloCheck -o HelloCheck
cd HelloCheck
dotnet run

Install tips

  • Install the SDK, not only the runtime, so you can build projects
  • Reopen the terminal if dotnet is not found
  • Visual Studio and VS Code both work well with C#
  • Keep the SDK updated for new language features

Comments

One comment per signed-in account. Comments are saved with this page’s URL.