Is there any native C#/C++ IDE similar to Visual Studio but more lightweight in Ubuntu? [duplicate]

Solution 1:

Visual Studio Code will show up in Ubuntu Software application if you search for "vscode" or it can be installed from the terminal by running the command sudo snap install code --classic A snap in classic confinement behaves as a traditionally packaged application with full access to the system, and Visual Studio Code extensions are installed into the user's home directory.

Visual Studio Code is not an full featured IDE. For this reason it is not possible to create a project in Visual Studio Code, like it is in Visual Studio. On the other hand it is possible to run Python, C, C++, JavaScript, PHP, Java, R and some other programming language code blocks directly in Visual Studio Code using the Code Runner extension. It is also possible to run HTML code in an external web browser using the open in browser extension. Visual Studio Code is a lot smaller than Microsoft Visual Studio, however many Visual Studio extensions can also be installed in Visual Studio Code by selecting View -> Extensions and then search for the extension that you want to install.


C# is open source and cross platform now that Microsoft has released a version of .NET Core. To install .NET Core in Ubuntu open the terminal and type:

sudo snap install dotnet-sdk --classic
sudo snap alias dotnet-sdk.dotnet dotnet # to run dotnet-sdk type dotnet

Run these commands to build and run an example C# Hello World console app from the terminal:

cd ~
mkdir C#_Projects
cd C#_Projects
mkdir HelloWorld
cd HelloWorld
dotnet new console
dotnet build --output ./build_output  
dotnet ./build_output/HelloWorld.dll

Results of dotnet ./build_output/HelloWorld.dll

Hello, World!