Installing MonoGame 3.6 on Linux

Sorry, did not see that while I was writing my comment… anyway System.UnauthorizedAccessException for both the config and log folders is what seems to be causing the crash… not sure why MD can’t get access to those folders… you might want to check the permissions on the folders manually.

So, I ran these two things (on the virtual machine):

sudo chown -R josh ~
sudo chmod -R 777 ~

But I still didn’t have any luck. :frowning: Any other suggestions?

If you are not paranoid about something like teamviewer I can try to fix it for you…

Can I DM you somehow?

For some reason, I hit a weird limit on replies in the DM. But no, it didn’t work. :frowning: I did sudo apt-get update and sudo apt-get install monodevelop, but monodevelop-stable still won’t launch.

Well turns out there is a bug with MG installer because it’s launching mdtool with root privileges… solution was to delete .config/MonoDevelop-6.0 and .cache/MonoDevelop-6.0 folders.

Hi, I am trying to follow along with this guide but I cannot launch Monodevelop Stable after installation. When I try to launch the program there is no response; nothing opens, no error messages show, absolutely nothing. If I try to run the monodevelop-stable file from terminal I get the following output:

Starting MonoDevelop
FATAL ERROR [2017-05-03 12:11:59Z]: 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.InvalidOperationException: Add-in engine not initialized.
  at Mono.Addins.AddinEngine.CheckInitialized () [0x0000c] in <bd16ebf525e04bea9f1e0907860e61de>:0 
  at Mono.Addins.AddinManager.GetExtensionObjects (System.String path) [0x00006] in <bd16ebf525e04bea9f1e0907860e61de>:0 
  at MonoDevelop.Ide.DesktopService.Initialize () [0x00010] in <8e60aa0560c44ca69e4f561f2f540933>:0 
  at MonoDevelop.Ide.IdeStartup.Run (MonoDevelop.Ide.MonoDevelopOptions options) [0x00332] in <8e60aa0560c44ca69e4f561f2f540933>:0 
  at MonoDevelop.Ide.IdeStartup.Main (System.String[] args, MonoDevelop.Ide.Extensions.IdeCustomizer customizer) [0x000ab] in <8e60aa0560c44ca69e4f561f2f540933>:0 

I definitely have gtk-sharp installed, but I don’t know what the Add-in engine it mentions is. Can anybody help me get around this issue? Not much of a point in having monogame if I can’t even start an IDE to use it with.

Thanks

What Linux distro and version are you running?

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