8

I am trying to start a new project for mac using MonoGame. I have installed everything I believe is required but when I run the new project (mono game logo should pop up) I get these two lines in the output:

Loaded assembly: /Users/Kristin/Projects/Test/Test/bin/Debug/Test.app/Contents/MonoBundle/Test.exe Loaded assembly: /Users/Kristin/Projects/Test/Test/bin/Debug/Test.app/Contents/MonoBundle/MonoMac.dll [External]

and the new application that is started hangs without popping up a window. I tried following the steps on this page: http://jamie.ly/wordpress/programming/software/setting-up-a-monogame-mac-application-with-xamarin-studio/

but nothing seems to be solving my problem. Any ideas?

poupou
  • 43,413
  • 6
  • 77
  • 174

1 Answers1

18

I know its late but I just joint monogame and found the solution: To make it work follow the following steps:

  • Install the latest xamarin studio from http://xamarin.com/studio
  • Next download the monogame files from https://monogame.codeplex.com/releases/view/102870
  • choose the xamarin version on mac

  • Next install the templates by opening xamarin studio. Next click on the top Mac menu "Xamarin Studio" Addin Manger and choose install from file and select your donwloaded file...

  • so far so good but your png files will not be loaded from here... so solve this issue follow the next steps: visit the git page from monogame and download it: https://github.com/mono/MonoGame

  • after Downloading and unpacking the zip file go into the folder and look open the following file by using xamarin studio MonoGame.Framework.MacOS.sln

  • Now Xamarin studio should open up and include 2 Projects: Lidgren. ... and Monogame.Framework.MacOS

  • on the top of Xamarin studio (besides the play button you should see Debug click on it and change it to Release
  • now do a right click on the Monogame.Framework.MacOS project and build it new
  • This should be done without any errors but you may get warnings... we do not pay attention on them :D
  • next do you need to go again to the downloaded Monogame folder from where you opened the MonoGame.Framework.MacOS.sln project.
  • But this time you need to dive more deep into the folder structure: look for the following folder --> MonoGame.Framework/bin/MacOS/Release
  • the files in the release folder are now your new libraries...
  • You can copy this libraries where ever you want but you should know where they are because you need to add them to your new monogame project.
  • Next open up Xamarin studio and create a new Monogame project by using the already installed templates...
  • Choose the Monogame Mac Application Template

We are now almost done:

  • Look for the reference "folder in the project tree inside of Xamarin studio" and do a right click on Monogame to delete the reference...
  • Now you need to add new references by right click on reference.
  • Access the .Net-Assemblies and add your files from the MonoGame.Framework/bin/MacOS/Release/- folder (make sure that you add all of them)

The final step now is to expand your Content folder in Xamarin studio and do a left click on the logo.png file. on the left side of the IDE you can find Properties. In the properties change 3rd from top to content instead of none. If you run now the template the graphic should be loaded without any problems :D

I TESTED IT ON SEVERAL MACHINES IT WORKS THAT WAY!!!!

ENJOY regards Schreda

Georg
  • 423
  • 3
  • 8
  • I followed these steps. All went well until the very end when I build. The graphic shows up on the screen for 2 second then I get a System.IO.FileNotFoundException. It points to "public Game1()" in Game1.cs. Could not load file or assembly 'System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Any ideas what this means? – LampShade Aug 09 '13 at 13:41
  • hmmm sorry dont know exactly can you check your files like click once on the Game1.cs class and check under the properties that the setting "Build action "is set to compile – Georg Sep 13 '13 at 19:18
  • Read elsewhere that it's better to change the Content properties to 'BundleResource' since 'Content' is obsolete: http://jaquadro.com/2013/09/monogame-hello-world-on-mac-os-x-and-xamarin-studio/ – Ein Doofus Feb 13 '15 at 20:31
  • When installing the latest Monogame 3.0.1 into Xamarin Studio for mac I get the following error: Core v4.0 not found, IDE 4.0 not found. – Kokodoko Mar 03 '15 at 15:08