Installing MonoGame 3.6 on Linux

Thanks for the fast reply. I am running GalliumOS 2.1 on an Acer Chromebook 15 (Broadwell).

When I have access to my machine again (on my phone now) I might try building directly from the source code.

I tried to use your monodevelop install script but it returns an error:

./monodevelop-6.2.0.1778-1.run: 1: eval: ./postinstall.sh: Permission denied

Itā€™s trying to open a script wich not ever exist. What should postinstall.sh be? Have I to third party download it?

postinstall scrip does exist, the .run installers are just self extracting archives that run a script from a temp dir, tho it seems that for some reason it does not get extracted with executable permissionsā€¦ what distro are you using?

what distro are you using?

Linux Mint 18 (KDE edition). Itā€™s based on Ubuntu 16.04.

Thks for the fast answer. :slight_smile:

Hmmmā€¦ I tested the installer (and actually made it for) Ubuntu 16.04 so that is quite strange.

Youā€™re right, I just tested it at my work and seems work fine. Anyway, I already compiled it by myself at home (boring process :disappointed:), so itā€™s working now. Thank you.

Thanks for the detailed information but it donā€™t work as well for me.
I installed a fresh Mint Mate 18.1. Before MonoGame I tried to install flatpak version of Xamarin Studio 7. It needed a few attempts but it worked at end (it didnā€™t worked at my ubunutu 16.04 but it had monogame plugin). I was happy that finally it worked. But it had no MonoGame plugin. So in the end (after testing many other stuff) I found this thread and tried it.

I canā€™t start monodevlop-stable. Without any error message in console. Monogame installer also donā€™t detect it.

So in ubunutu monogame plugin is working but creating new solution donā€™t work and in Mint I have a working Xamarin but monogame dont work :frowning:
Are there plans to support the new flatpak xamarin version? Or is there an add-in file for MonoGame to Xamarin?.

Why they sold it to Mircrosoftā€¦ it worked that well beforeā€¦

Considering MG isnā€™t able to detect it you probably didnā€™t install something correctly.

For now MD 7 isnā€™t really supported at all, which is why I did not update the md installer script (need that sweet 6 release). As for actually supporting the flatpak version, well it boils down to 3 topics:

  • project templates - for 3.7 we will probably provide a project generation tool so it is not tied to any IDE
  • content builder - flatpak isolates /usr so that means we canā€™t really access the content builder. One alternative I came up with is the nuget package of it (currently unofficial and you will need to know how to modify the csproj file in order to use it). With this you can compile MG projects from the flatpak version, yes I tested it.
  • letting the end binary access system libraries - this one is actually a bug with what MD from flatpak does, it launches anything you build and debug in the sandbox, instead of launching it on the system. This means the game canā€™t access audio/graphics stuff properly.

I would argue it never worked well, every MonoDevelop release broke the addin APIā€¦ They literally never cared about maintaining compatibility. As for the Linux MD releases, I donā€™t know how long youā€™ve been around Linux space, but when they were on MD 4, they didnā€™t even bother to offer a Linux version of it, they are just as horrible as ever on that front.

I checked if some log files exist:

FATAL ERROR [2017-05-16 11:24:05Z]: MonoDevelop failed to start. Some of the assemblies required to run MonoDevelop (for example gtk-sharp)may not be properly installed in the GAC.
System.TypeInitializationException: The type initializer for 'MonoDevelop.Core.Runtime' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
File name: 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
  at MonoDevelop.Core.CoreConfigurationProperty`1[T]..ctor (System.String name, Boolean defaultValue, System.String oldName) <0x400844e0 + 0x00063> in <filename unknown>:0 
  at MonoDevelop.Core.ConfigurationProperty.Create[T] (System.String propertyName, MonoDevelop.Core.T defaultValue, System.String oldName) <0x40084480 + 0x00043> in <filename unknown>:0 
  at MonoDevelop.Core.RuntimePreferences..ctor () <0x40084000 + 0x0001f> in <filename unknown>:0 
  at MonoDevelop.Core.Runtime..cctor () <0x40083fb0 + 0x00027> in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at MonoDevelop.Ide.IdeStartup.Main (System.String[] args, MonoDevelop.Ide.Extensions.IdeCustomizer customizer) <0x40026ee0 + 0x00183> in <filename unknown>:0 

Unhandled Exception:
System.TypeInitializationException: The type initializer for 'MonoDevelop.Core.Runtime' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
File name: 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
  at MonoDevelop.Core.CoreConfigurationProperty`1[T]..ctor (System.String name, Boolean defaultValue, System.String oldName) <0x400844e0 + 0x00063> in <filename unknown>:0 
  at MonoDevelop.Core.ConfigurationProperty.Create[T] (System.String propertyName, MonoDevelop.Core.T defaultValue, System.String oldName) <0x40084480 + 0x00043> in <filename unknown>:0 
  at MonoDevelop.Core.RuntimePreferences..ctor () <0x40084000 + 0x0001f> in <filename unknown>:0 
  at MonoDevelop.Core.Runtime..cctor () <0x40083fb0 + 0x00027> in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at MonoDevelop.Ide.IdeStartup.Main (System.String[] args, MonoDevelop.Ide.Extensions.IdeCustomizer customizer) <0x40026ee0 + 0x00247> in <filename unknown>:0 
  at MonoDevelop.Startup.MonoDevelopMain.Main (System.String[] args) <0x40026d50 + 0x0000f> in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'MonoDevelop.Core.Runtime' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
File name: 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
  at MonoDevelop.Core.CoreConfigurationProperty`1[T]..ctor (System.String name, Boolean defaultValue, System.String oldName) <0x400844e0 + 0x00063> in <filename unknown>:0 
  at MonoDevelop.Core.ConfigurationProperty.Create[T] (System.String propertyName, MonoDevelop.Core.T defaultValue, System.String oldName) <0x40084480 + 0x00043> in <filename unknown>:0 
  at MonoDevelop.Core.RuntimePreferences..ctor () <0x40084000 + 0x0001f> in <filename unknown>:0 
  at MonoDevelop.Core.Runtime..cctor () <0x40083fb0 + 0x00027> in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at MonoDevelop.Ide.IdeStartup.Main (System.String[] args, MonoDevelop.Ide.Extensions.IdeCustomizer customizer) <0x40026ee0 + 0x00247> in <filename unknown>:0 
  at MonoDevelop.Startup.MonoDevelopMain.Main (System.String[] args) <0x40026d50 + 0x0000f> in <filename unknown>:0 

But I already have installed gtk-sharp. It also gets detected by the monogame installation. MonoDev 5.1 and 7 is also working.

You are missing mono .Net framework 4 runtime, itā€™s a separate package, but I donā€™t remember its name.

I installed mono-complete. Itā€™s working now!
Thank you.

Edit: Well I can start MonoDevlop, create a new Solution also with MonoGame but I canā€™t build any.

92mINFO [2017-05-16 11:57:47Z]:e[0m Starting MonoDevelop 6.2
e[92mINFO [2017-05-16 11:57:47Z]:e[0m Running on Mono 4.2.1 (Debian 4.2.1.102+dfsg2-7ubuntu4) (64-bit)
e[92mINFO [2017-05-16 11:57:47Z]:e[0m Operating System: Linux
Linux yilimipc 4.4.0-77-generic #98-Ubuntu SMP Wed Apr 26 08:34:02 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
e[92mINFO [2017-05-16 11:57:47Z]:e[0m Using GTK+ 2.24.30
WARNING: The add-in 'MonoDevelop.ChangeLogAddIn,6.2' could not be updated because some of its dependencies are missing or not compatible:
  missing: MonoDevelop.VersionControl,6.2
e[92mINFO [2017-05-16 11:57:48Z]:e[0m Add-in loaded: MonoDevelop.Core
e[92mINFO [2017-05-16 11:57:48Z]:e[0m Add-in loaded: MonoDevelop.Ide
e[91mWARNING [2017-05-16 11:57:48Z]:e[0m No proxy credential provider was found
e[92mINFO [2017-05-16 11:57:48Z]:e[0m Initializing Runtime Mono 4.2.1
e[92mINFO [2017-05-16 11:57:48Z]:e[0m GTK: Using Gtk theme from /usr/share/themes/Mint-X-Sand
Starting MonoDevelop
e[92mINFO [2017-05-16 11:57:48Z]:e[0m Add-in loaded: MonoDevelop.GnomePlatform
e[92mINFO [2017-05-16 11:57:48Z]:e[0m Add-in loaded: MonoDevelop.DesignerSupport
e[92mINFO [2017-05-16 11:57:48Z]:e[0m Add-in loaded: MonoDevelop.MonoGame
e[92mINFO [2017-05-16 11:57:48Z]:e[0m Add-in loaded: MonoDevelop.Debugger
e[92mINFO [2017-05-16 11:57:48Z]:e[0m Add-in loaded: MonoDevelop.SourceEditor2
e[92mINFO [2017-05-16 11:57:48Z]:e[0m Add-in loaded: MonoDevelop.TextTemplating
e[92mINFO [2017-05-16 11:57:48Z]:e[0m Add-in loaded: MonoDevelop.Xml
e[92mINFO [2017-05-16 11:57:48Z]:e[0m Add-in loaded: MonoDevelop.AspNet
e[92mINFO [2017-05-16 11:57:48Z]:e[0m Add-in loaded: MonoDevelop.GtkCore
e[92mINFO [2017-05-16 11:57:48Z]:e[0m Add-in loaded: MonoDevelop.UnitTesting
e[92mINFO [2017-05-16 11:57:48Z]:e[0m Add-in loaded: MonoDevelop.RegexToolkit
e[92mINFO [2017-05-16 11:57:48Z]:e[0m Add-in loaded: MonoDevelop.Refactoring
e[92mINFO [2017-05-16 11:57:48Z]:e[0m Add-in loaded: MonoDevelop.FSharpBinding
e[92mINFO [2017-05-16 11:57:48Z]:e[0m Add-in loaded: MonoDevelop.CSharpBinding
e[92mINFO [2017-05-16 11:57:48Z]:e[0m Add-in loaded: MonoDevelop.VBBinding
e[91mWARNING [2017-05-16 11:57:48Z]:e[0m Inotify watch limit is too low (8192).
MonoDevelop will switch to managed file watching.
See http://monodevelop.com/Inotify_Watches_Limit for more info.
e[92mINFO [2017-05-16 11:57:48Z]:e[0m Add-in loaded: MonoDevelop.PackageManagement
e[92mINFO [2017-05-16 11:57:48Z]:e[0m Add-in loaded: MonoDevelop.Packaging
   Loading Workbench
e[92mINFO [2017-05-16 11:57:48Z]:e[0m Add-in loaded: MonoDevelop.Deployment
e[92mINFO [2017-05-16 11:57:48Z]:e[0m Add-in loaded: MonoDevelop.DocFood
e[92mINFO [2017-05-16 11:57:48Z]:e[0m Add-in loaded: MonoDevelop.AssemblyBrowser
e[92mINFO [2017-05-16 11:57:48Z]:e[0m Add-in loaded: MonoDevelop.ConnectedServices
e[92mINFO [2017-05-16 11:57:48Z]:e[0m Add-in loaded: MonoDevelop.WebReferences
      Initializing Main Window
e[92mINFO [2017-05-16 11:57:48Z]:e[0m Creating DefaultWorkbench
e[92mINFO [2017-05-16 11:57:49Z]:e[0m Updating Welcome Page from 'http://software.xamarin.com/Service/News'.
e[92mINFO [2017-05-16 11:57:49Z]:e[0m Add-in loaded: MonoDevelop.Deployment.Linux
e[92mINFO [2017-05-16 11:57:49Z]:e[0m Welcome Page updated.
e[92mINFO [2017-05-16 11:57:57Z]:e[0m Add-in loaded: MonoDevelop.UnitTesting.NUnit
e[92mINFO [2017-05-16 11:57:57Z]:e[0m Add-in loaded: MonoDevelop.ILAsmBinding
Microsoft.Build.BuildEngine.UnknownToolsVersionException: Unknown tools version: '14.0' . Known versions: '2.0' '3.0' '3.5' '4.0' '12.0'
  at Microsoft.Build.BuildEngine.Engine.set_DefaultToolsVersion (System.String value) <0x409fb080 + 0x000a7> in <filename unknown>:0 
  at MonoDevelop.Projects.MSBuild.BuildEngine..ctor () <0x409f8ed0 + 0x000bf> in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) MonoDevelop.Projects.MSBuild.BuildEngine:.ctor ()
  at MonoDevelop.Projects.MSBuild.MainClass.Start () <0x409c6bc0 + 0x0003f> in <filename unknown>:0 
  at MonoDevelop.Projects.MSBuild.MainClass.Main (System.String[] args) <0x409c5050 + 0x000d3> in <filename unknown>:0 
e[91me[103mERROR [2017-05-16 11:58:09Z]:e[0m The MSBuild builder exited before initializing
e[92mINFO [2017-05-16 11:58:09Z]:e[0m Add-in loaded: MonoDevelop.HexEditor
e[92mINFO [2017-05-16 11:58:10Z]:e[0m Add-in loaded: MonoDevelop.Debugger.Gdb
e[92mINFO [2017-05-16 11:58:10Z]:e[0m Add-in loaded: MonoDevelop.Debugger.Soft
e[91me[103mERROR [2017-05-16 11:58:14Z]:e[0m Error while getting referenced assemblies
System.Exception: MSBuild process could not be started
  at MonoDevelop.Projects.MSBuild.MSBuildProjectService+<GetProjectBuilder>c__async5+<GetProjectBuilder>c__AnonStorey1A+<GetProjectBuilder>c__async18.MoveNext () <0x41754700 + 0x0089f> in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7feeab4016d0 + 0x00029> in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x7feeab3ff6b0 + 0x000a7> in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x7feeab3ff630 + 0x0006b> in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x7feeab3ff5e0 + 0x0003a> in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () <0x7feeab3ff8d0 + 0x00017> in <filename unknown>:0 
  at MonoDevelop.Projects.MSBuild.MSBuildProjectService+<GetProjectBuilder>c__async5.MoveNext () <0x41750b10 + 0x00e80> in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x7feeab4016d0 + 0x00029> in <filename unknown>:0 
...

Edit 2: If I remove ā€œUse MSBuild Engine (recomend for this type of project)ā€ in solution option menu it is working.
But it should be active or?

Hey guys. I had originally tried installing MonoGame on Linux Mint a month or two ago, but ran into numerous problems. The MonoDevelop repo was not up to date at all (ver 5 I think), and even if you install it, it would not run properly without messing with its permissions. The MonoGame pipeline tool would not load at all. Building MonoDevelop, no matter what version, seemed to end in failure. Assuming you did get some version of MonoDevelop running, the MonoGame project templates were not present. It was quite the crippling problem, and I gave up on trying to get MonoGame to work on Linux and resorted instead to the Godot engine which runs just fine on Linux.

Anyway, today I decided to attempt to get Arch working. I was successful in getting that with Gnome to work, and decided on a whim to try MonoGame again, curious if there would be any differences.

So under Arch, as of today (not sure if this is a recent change or just Arch specific), installing MonoDevelop via pacman gets you version 6 and it ran fine, at first. Installing MonoGame with that installed will give you a functional pipeline and the project templates in MonoDevelop; however, MonoDevelop would crash when creating any project. This problem was fixed by disabling the Git add-on in the add-ons manager, and I was able to load the MonoGame OpenGL project and modify its contents.

Hiting the run button in MonoDevelop gives you the default cornflower blue MonoGame window. It works!

1 Like

Hello all,

Itā€™s been 2 days that now Iā€™m trying to install MonoGame on my computerā€¦ I thought this post would solve all my problems butā€¦ no, itā€™s still not working.

Iā€™ve followed all the instructions mentioned here (at least I think I did):

  • I had Monodevelop 5.10

  • Iā€™ve installed the latest release (7.0.1)

  • Iā€™ve installed MonoDevelop 6 (being MonoDevelop Stable) in my Applications list

  • Iā€™ve installed MonoGame. The install ended like this:

    XXX@XXX-YYY:~$ sudo ./monogame-sdk.run
    [sudo] Mot de passe de XXX :
    Verifying archive integrityā€¦ All good.
    Uncompressing Monogame Pipeline Installerā€¦
    Dependencies:

    • mono-runtimeā€¦[Found]
    • gtk-sharp3ā€¦[Found]

    Optional Dependencies:

    • MonoDevelop 6ā€¦[Found]
    • Riderā€¦[Not Found]
    • referenceassemblies-pcl / mono-pclā€¦[Found]
    • ttf-mscorefonts-installer / mscore-fontsā€¦[Not Found]

    Continue (Y, n): Y
    Previous version detected, trying to uninstallā€¦
    Installing MonoGame SDKā€¦
    Installing MonoDevelop Addinā€¦
    Creating launcher itemsā€¦
    gtk-update-icon-cache: Cache file created successfully.
    Adding mimetypeā€¦
    To uninstall MonoGame SDK you can run ā€œmonogame-uninstallā€ from terminal.

As a reasult, I now see MonoGame Pipeline Tool in my Applications but from Monodevelop, no MonoGame template, no addin, nothingā€¦

What am I missing?

Thank you for your help,
Faguoren

You are the hero, cra0zy!
Iā€™ve been trying to make MonoGame work with MonoDevelop for 2 days, nothing worked!
Until I found this thread.
Everything works smoothly on my up-to-date Ubuntu 16.04 LTS

ā€˜2.5. Just open MonoDevelop Stable so it creates the necessary files as the current user.ā€™
quite new to linux - how do you do this? everytime I open monodevelop it opens v 5.10

edit: when I try to open monodevelop stable it attempts for a few seconds, then goes away

Post your ~/.config/MonoDevelop-6.0/Logs/Ide.log file.

Thank you very much for your work. Works like a charm!

Bonus tip:

If you have problem with MonoGame Template like it looks like it doesnā€™t work for building process - you need copy from /opt/MonoGameSDK/Assemblies/DesktopGL/**
to your Solutionā€™s directory and make sure x86 and x64 and sometimes native libraries into ā€œcopy alwaysā€ and make sure reference assembly both Microsoft.XNA.Frameworks.dll and Microsoft.XNA.Frameworks.Net.dll and create MyGame.cs write like same template of Visual Studio 2017 - MonoGame SDK or check github if it is same.than

Open Program.cs and replace it

using System;
namespace YourNameSpace
{
	class MainClass
	{
		public static void Main(string[] args)
		{
			Console.WriteLine("Hello World!");
		}
	}
}

with this:

using System;
namespace YourNameSpace
{
	static class Program
	{
		static int Main(string[] args)
		{
			using (var game = new MyGame())
			{
				game.Run();
			}
			return 0;
		}
	}
}

And compile it and run it. Yeah MonoGame runs under Ubuntuā€¦

I have run into this too. You should be able to start it as SU. I havenā€™t tracked down all the folders and files to chown in order to run it under my user ID. @harry-cpp, is it obvious to you what @liamkennedy89 and I have done wrong and need to do to correct it?

PS-Thanks very much for putting this togetherā€“I wasted a few hours trying to get MonoGame and MonoDevelop working together until I found your installer!

It looks like Arch isnā€™t packaging monodevelop anymore. There are multiple versions in the AUR and I canā€™t get any of them to build cleanly. I canā€™t even get monodevelop to compile manually. Iā€™ve tried several tagged versions from 7.0 to 7.3. Guess itā€™s time to try some of the 6.x tagged versions =(