2

I would like to install mono-complete so that PlayOnLinux will work properly. http://www.mono-project.com/download/

This post describes how to install MonoDevelop on Ubuntu 17.04: How to install MonoDevelop on Ubuntu 17.04?

In my Ubuntu Software, searching for "mono" does bring up an entry for "MonoDevelop" (Develop .NET applications in an Integrated Development Environment).

Will MonoDevelop work for my needs even though I'm not trying to develop anything?

1 Answers1

2

The MonoDevelop package from the default Ubuntu 17.10 repositories is named monodevelop. Alternatively you can also run C# code from the terminal without installing MonoDevelop IDE as shown in the following example.

Run C# program in the terminal

  1. Install mono-complete from the default Ubuntu repositories.

    sudo apt install mono-complete  
    

    Optionally you can also install the Mono Visual Basic Compiler (VB.NET).

    sudo apt install mono-vbnc  
    
  2. Save this example C# code in a file called hello.cs. libdvdcss using System;

    namespace Project_1 {
        class MainClass {
            public static void Main (string[] args) {
                Console.WriteLine ("Hello World!");
                Console.ReadKey ();
            }
        }
    }
    
  3. Make hello.cs executable. Right-click the hello.cs file -> select Properties -> Permissions tab -> put a check mark to the left of Allow executing file as program.

  4. Change directories using the cd command to the directory that contains the hello.cs file.

  5. Use the mcs compiler and create a Windows executable named hello.exe from the source hello.cs.

    mcs -out:hello.exe hello.cs
    
  6. Run the hello.exe program with mono.

    mono hello.exe
    
  7. The results of running your program in step 6. should be:

    Hello World!  
    
  8. Press Enter to exit back to a default terminal prompt.

Run C# program in MonoDevelop

  1. Install MonoDevelop from the default Ubuntu repositories.

    sudo apt install monodevelop # 17.10 and earlier
    
  2. Open MonoDevelop application.

  3. Create a new project. Select File -> New -> Solution -> .NET -> Console Project -> check the dropdown menu next to Console Project to make sure that C# is selected -> click the Next button -> select a name and directory location for your project -> click the Create button.

  4. In the left pane select Program.cs. Copy the example C# code from the hello.cs file in Step 2. into Program.cs.

  5. Select Build -> Build All.

  6. Click the Run arrow in the upper left corner of MonoDevelop to run the program.

karel
  • 114,770
  • I followed the terminal instructions and I did get "Hello World!" to print out. Unfortunately when I try to run the installer for Path of Exile through PlayOnLinux, the installer only shows a picture and blank spaces where I'm assuming text should be and the buttons don't have any text marking them either i.e.: Back, Next, Cancel. I think Mono is supposed to be what makes the text visible. I think you answered my question and I need to ask for help on PlayOnLinux's forum now. Thanks. – PP725SX4 Dec 06 '17 at 07:04