First things first: you need to install dotnet core on your computer. You can find the SDK download and instructions here:
To allow Aptitude to install Microsoft packages, you’ll have to add the Microsoft Certificate Key. Luckily, Microsoft has provided this in a convenient package.
wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb sudo dpkg -i packages-microsoft-prod.deb
Once you have the key, you’ll need to add the repository and HTTPS support.
sudo add-apt-repository universe sudo apt install apt-transport-https sudo apt update
Finally, you’re ready to install dotnet core!
sudo apt install dotnet-sdk-2.2
The next thing you’ll need to do is set up your IDE. you could use vi or nano, but to make things consistent and simple, I use VS Code. You’ll have to download the .deb package from here: https://code.visualstudio.com/#alt-downloads
Direct Link: https://go.microsoft.com/fwlink/?LinkID=760868
Then you just need to install it! (your version number might be different)
sudo dpkg -i code_1.31.1-1549938243_amd64.deb
Once you’ve installed the editor, run it and add the C# extension. You can find it here: https://marketplace.visualstudio.com/items?itemName=ms-vscode.csharp
copy the quick code line
ext install ms-vscode.csharp
and in VS Code press Ctrl+P and paste the line in to install.
Now you’re set up to build dotnet core applications and libraries on Ubuntu! For what you can do with this, please see my post on [How to set up a dotnet core REST API with Dapper and xunit]! (coming soon)