Windows

  1. Download Visual Studio:

    • Download and install Visual Studio which includes C# support. Choose the workload for .NET development during installation.
  2. Alternative: .NET Core SDK:

    • Download and install .NET Core SDK which provides a command-line interface for C# development.
  3. Verify Installation:

    • Open Command Prompt and type:
  dotnet --version
  

Linux (CentOS/RHEL using yum)

  1. 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
  
  1. Verify Installation:
  • Open Terminal and type:
  dotnet --version
  

Linux (Ubuntu/Debian using apt)

  1. 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
  
  1. 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
  
  1. Verify Installation:
  • Open Terminal and type:
  dotnet --version