This is actually way easier than the answer me what you do is -
sudo apt get-update
then run - sudo apt install code
# Update the packages index and install the dependencies by running the following
# command as a user with sudo privileges :
==> sudo apt update
==> sudo apt install software-properties-common apt-transport-https wget
# Import the Microsoft GPG key using the following wget command :
==> wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
# And enable the Visual Studio Code repository by typing:
==> sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
# Once the apt repository is enabled , install the Visual Studio Code package:
==> sudo apt install code
# When a new version is released you can update the Visual Studio Code package
# through your desktop standard Software Update tool or by running the following commands in your terminal:
==> sudo apt update
==> sudo apt upgrade
// With love @kouqhar
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
sudo apt install apt-transport-https
sudo apt update
sudo apt install code
As of January 01,2022, Visual Studio is only availvabe for Windows and Mac OS.
You can use Visual studio code or use Jetbrains `Rider` for C#
wget -qO- https://raw.githubusercontent.com/Botspot/pi-apps/master/install | bash ##installs Pi-Apps
##Go to "editors" and select Visual Studio.
##it will take a bit to download.
sudo apt-get install wget gpg
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
rm -f packages.microsoft.gpg
sudo snap install --classic codeCopy