On this page
Installing C# (.NET Development Environment)
Windows
-
Download Visual Studio:
- Download and install Visual Studio which includes C# support. Choose the workload for .NET development during installation.
-
Alternative: .NET Core SDK:
- Download and install .NET Core SDK which provides a command-line interface for C# development.
-
Verify Installation:
- Open Command Prompt and type:
dotnet --version
Linux (CentOS/RHEL using yum)
- Install .NET SDK:
- Register Microsoft key and feed:
sudo rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm
- Install SDK:
sudo yum install -y dotnet-sdk-5.0
- Verify Installation:
- Open Terminal and type:
dotnet --version
Linux (Ubuntu/Debian using apt)
- Install .NET SDK:
- Register Microsoft key and feed:
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get update
- Install SDK:
sudo apt-get install -y dotnet-sdk-5.0
- Verify Installation:
- Open Terminal and type:
dotnet --version
macOS
-
Install .NET SDK:
-
Install Homebrew if not already installed:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Install SDK:
brew install dotnet-sdk
- Verify Installation:
- Open Terminal and type:
dotnet --version