Welcome to ASP.NET Core! This guide will walk you through the essential steps to get ASP.NET Core installed on your development machine. ASP.NET Core is a cross-platform, high-performance, open-source framework for building modern, cloud-enabled applications.
Windows Installation
For Windows, we recommend installing the .NET SDK, which includes ASP.NET Core.
1. Download the .NET SDK
Visit the official .NET download page and download the latest LTS (Long-Term Support) or current version of the .NET SDK. For most users, the LTS version is recommended for stability.
2. Run the Installer
Once the download is complete, run the installer package. Follow the on-screen instructions. The installer will add the necessary tools and environment variables to your system.
3. Verify Installation
Open a new Command Prompt or PowerShell window and run the following command:
dotnet --version
This should display the installed .NET SDK version. You can also verify the ASP.NET Core runtime:
dotnet --info
macOS Installation
On macOS, you can install the .NET SDK using Homebrew or by downloading the official installer.
Option 1: Using Homebrew (Recommended)
If you don't have Homebrew installed, open your Terminal and run:
sudo rpm -Uvh https://packages.microsoft.com/config/centos/$(rpm -E %osrelease | sed 's/.*\.//')/packages-microsoft-prod.rpm
2. Install the .NET SDK
After setting up the repository, install the SDK:
Debian/Ubuntu:
sudo apt-get update
sudo apt-get install -y dotnet-sdk-7.0 # Replace 7.0 with your desired version
Fedora:
sudo dnf update
sudo dnf install dotnet-sdk-7.0 # Replace 7.0 with your desired version
CentOS/RHEL:
sudo yum update
sudo yum install dotnet-sdk-7.0 # Replace 7.0 with your desired version
3. Verify Installation
Open your Terminal and run:
dotnet --version
And for more details:
dotnet --info
Important: After installing, it's a good practice to close and reopen your terminal or IDE to ensure that all environment variables are loaded correctly.
Next Steps
Once you have the .NET SDK installed, you're ready to create your first ASP.NET Core application! You can use the `dotnet new` command to scaffold new projects.