Installing MonoGame 3.6 on Linux

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.

Hello there!

I followed the steps, and everything went fine 'til I reached the monogame installation dependencies.
It says that I don’t have gtk Sharp 3 installed:

` Dependencies:

  • mono-runtime…[Found]
  • gtk-sharp3…[Not Found]

Optional Dependencies:

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

Continue (Y, n):
`

But I installed it before with “apt-get install libgtk-3-dev”.
How can I solve this?

Install package “gtk-sharp3”

Hi,

doesn’t work with Fedora 27. There are no project templates in MD-stable. There were some “usage” messages during monogame install.

`[oppa@oppa-hex-ssd Downloads]$ su -c ‘./monogame-sdk.run’
Password:
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):
Installing MonoGame SDK…
Installing MonoDevelop Addin…
usage: sudo -h | -K | -k | -V
usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]
usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user] [command]
usage: sudo [-AbEHknPS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p prompt] [-T timeout] [-u user] [VAR=value] [-i|-s] []
usage: sudo -e [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p prompt] [-T timeout] [-u user] file …
Creating launcher items…
gtk-update-icon-cache: Cache file created successfully.
Adding mimetype…
To uninstall MonoGame SDK you can run “monogame-uninstall” from terminal.
`
Debian doesn’t work at all (MD crashing), F27 doesn’t show project templates. Got it, I’ll boot W10…

Edit: Looks like it did not arrive in MD-stable. What now, run installer again ?

No one, Windows lock-in for me ? :sob:

Strange, you can still install the addin from the gallery tab.

Hi,

I ran monogame-sdk.run again. This time using sudo instead of root account. No sudo errors and it’s showing up in MD-stable now.

The pipeline tool crashed because of a missing gtk-sharp3-devel. Found this online, was solved by installing that package.

Now I still have a minor problem with a project from Dr.T’s course at Coursera.

using Microsoft.Xna.Framework.Storage; - The type or namspace name ‘Storage’ does not exist in the namespace ;Microsoft.Xna.Framework’. Are you missing an assembly reference ?

For now I can simply uncomment that, it still builds and runs so far…

Thanks,
Stephan

Ah, makes sense now.

Yup, Fedora broke the gtk-sharp-3 package into 2 parts, and included glue libraries in the wrong one… on the bright side you’ll be glad to know that MG 3.7 will not need this dependency.[quote=“Stephan_Goldenberg, post:51, topic:8811”]
using Microsoft.Xna.Framework.Storage; - The type or namspace name ‘Storage’ does not exist in the namespace ;Microsoft.Xna.Framework’. Are you missing an assembly reference ?
[/quote]

Storge API was removed from MonoGame since it was not really crossplatform.

1 Like