Installing MonoGame 3.6 on Linux

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 =(

If you are able to run it with the root user, but not with the current user, than just delete your ~/.config/MonoDevelop-6.0 and ~/.cache/MonoDevelop-6.0 folders and you should be able to run it with your current user.

And if that doesn’t do it, post your ~/.config/MonoDevelop-6.0/Logs/Ide.log file, maybe I’ll know what’s causing it.

1 Like

Yea, its a bummer, monodevelop-stable AUR did compile for me last time I checked tho. That being said, version 6 should work for now out of the box, and if you decide to go for version 7 you’ll need to install msbuild and its extensions package and update gtk-sharp 2 to a newer version.

Thanks very much! Once I chown’ed both the ~/.cache/MonoDevelop-6.0 and ~/.config/MonoDevelop-6.0 directories and their contents to my user ID I was all set.

I’ve tried building MANY tagged versions (6 and 7) over the past few days and had 0 success getting any of them to build unfortunately =\

Also, the version of msbuild 15.5 from the AUR is busted as well. The URL no longer exists on mono-project.com. I managed to hack the PKGBUILD to pull 15.4. I don’t know if that’s related to my issues or not.

At this point, I don’t really know what else to try. Here’s a gist of what happens when I attempt to build it:
https://gist.github.com/nchowning/c0a3ee0cdc7e0349c627d586d2e84503

I included the output from ‘pacman -Q’ at the beginning so you could have a reference for the packages that I have installed. Any help that

Hello Harry. What do you use Arch Linux repo with already installed monodevelop IDE? Because sometimes I also use Arch Linux x86 and feel troubles with installing monodevelop. Thanks.