Refs:

Install .NET Core SDK or .NET Core Runtime on Ubuntu

Visual Studio Code on Linux

Tutorial: Create a .NET Core console application using Visual Studio Code

Install .NET Core SDK

The .NET Core Software Development Kit (SDK) is installed Ubuntu using the terminal command line. Be sure updates have been downloaded and applied first

sudo apt-get update

sudo apt-get upgrade

and maybe a restart if it's convenient (just to be on the safe side)

sudo shutdown -r now

A recent .NET core SDK can be installed with

sudo apt-get update && \

  sudo apt-get install -y dotnet6

The command dotnet --list-sdks should show the SDK(s) installed.

$ dotnet --list-sdks

6.0.109 [/usr/lib/dotnet/dotnet6-6.0.109/sdk]

Setup Visual Studio Code

If VS Code isn't already installed it can be installed with

sudo snap install code --classic

after which the command code should open a VS Code window (VS Code can also be opened from the desktop via applications)

To add C# Extensions in VS Code use Go | Go to File from the menu or Ctrl + P and use ext install c# as the search criteria. Click Install next to the C# extension from Microsoft and it will begin installing. After installation you can select a color scheme.

 

A Quick Test

Follow guidance from Tutorial: Create a .NET Core console application using Visual Studio Code to create and run a Hello World! application. Note that the application can be run from a VS Code terminal but also from a terminal if dotnet and the fully qualified path to the .dll is used.