Skip to main content

Setup Visual Studio Code in Ubuntu

You could install Visual Studio Code using apt:

wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" | sudo tee /etc/apt/sources.list.d/vscode.list
sudo apt update
sudo apt install code

or snap:

sudo snap install code --classic

After the C# package installing, the next dialog box appears: Clicking the marked button opens the next page, which provides the instructions for .Net Core SDK installation (along with ASP.Net Core runtime and .Net Core runtime installation instructions):

wget https://packages.microsoft.com/config/ubuntu/19.10/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo apt install ./packages-microsoft-prod.deb
sudo apt-get update
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install dotnet-sdk-3.1

monodevelop IDE seems is not an option now, because of I could not find it. But if you want to install the current mono version (For example, on 20.04, amd64 architecture) you could use official mono repository:

sudo apt install gnupg ca-certificates
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb [arch=amd64] https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
sudo apt install mono-devel

You could also install additional mono packages, which you could find by:

apt-cache search mono

The man mono will introduce you to its usage:

    DESCRIPTION
mono is a runtime implementation of the ECMA Common Lan‐
guage Infrastructure. This can be used to run ECMA and
.NET applications.