2

How well do these work? I'm downloading a ton of new distros to decide which one I want to run.

The reason I'm asking is I have to take C# on a Windows computer for school.

Can I get away with one of these?

2
  • I would go for a Virtualbox+Windows setup and totally never look at wine for anything ever.
    – Rinzwind
    Feb 12, 2018 at 8:13
  • Wine works well for playing some games. I couldn't get the games to work in virtualbox. Feb 12, 2018 at 12:53

2 Answers 2

4

C# code runs natively in Ubuntu.

The terminal and MonoDevelop (monodevelop) from the default Ubuntu repositories is maybe all you need. MonoDevelop can be installed from the default Ubuntu repositories in Ubuntu 17.10 and earlier. This link tells how to run C# programs from the terminal and in MonoDevelop: How do I install Mono for 17.10?


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 vscode --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.

After it is installed, Visual Studio Code requires additional configuration to get the debugging features of each programming language working. Depending on the programming language, this may require downloading a large amount of additional software into your home directory. This isn't the same as installing software through Wine, but Visual Studio Code will recommend installing a lot of the same software in Ubuntu that is installed in Windows which makes Ubuntu into what may be too much like a "hybrid" operating system experience for some users.

Visual Studio Code is a good and useful code editor for exactly the opposite reason. 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!
1

PlayOnLinux is a helper application designed to help you set up applications for Wine. Installing it on Ubuntu will require Wine to be installed (it will install Wine if it isn't already).

How well Wine works depends on the software you run with it. WineHQ is the best source for what applications run well with Wine and how to get them to work.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .