Monogame 3.5 not generating .app file on Mac

I recently created a Monogame 3.5 DesktopGL project in Visual Studio 2013 on my windows PC. I am now trying to open the same exact solution in Xamarin Studio 5.1 on my Mac.

The solution opened up just fine, everything compiled fine as well, but when I try to run it, nothing happens. No errors, nothing.

I went to the Debug folder for the project and saw this:

No .app file was created, so my Mac wouldn’t be able to run it anyway. In the past, with Mac projects in Monogame, a .app file has been generated and there was no issue.

My understanding was that this DesktopGL project could be opened on either operating system and should function exactly the same way. All of that works except the generation of the executable.

Help! Thanks in advance :slightly_smiling:

DesktopGL project is not a MonoMac/XamarinMac app, it’s there to provide an exe that can be run from all Desktop OSs, if you want to package it to an .app you need to do it manually.

2 Likes

I’m running into the same issue. I tried looking around but I can’t figure out how to manually package it into an .app

This is our first time I’m trying to run something cross platform with MonoGame.

Do you know how I would package it manually?

It would be nice to have something integrated in MG to actually do the dirty work and package it up into a .app

You have Mac templates…

Hello everyone, forgive me for not understanding, but could someone elaborate a bit more with the steps one would take to create a .app?

I used the DesktopGL template and Im running Xamarin/Monogame 3.5 on OSX.

Any help much appreciated!,
-Jacob

Here is a guide how to make your own .app

https://mathiasbynens.be/notes/shell-script-mac-apps

Thanks for the reply, but Im still confused as to what I would put into the contents of the app package? All in see in my build output are dll files and and .exe, .exe.mdb

Thanks,
Jacob

Unless you are not using any art/audio content at all in your app there should be a Content directory there as well.
I would try putting all the dll’s, the exe, the .config and the Content directory in there. I think they should be directly in the MacOS folder.

So I just followed the directions to manually make a .app, it’s pretty easy: Package games for distribution | MonoGame Documentation
Step-by-step for those still mystified:

  • navigate to your game folder in the terminal
  • run the build script as indicated
  • make a folder somewhere that will be your .app
  • make the folder structure as indicated
  • copy all the files from the publish folder that the build script made to YourAppFolder/Contents/MacOS folder (gameprojectfolder/bin/Release/netcoreapp.3.1/osx-x64/publish)
  • copy the publish/Content folder to the Contents/Resources folder
  • make an Info.plist file as indicated, customize it
  • add .icns and whatever else
  • append .app to the parent folder you made
  • you should have a working app!

https://docs.monogame.net/articles/packaging_games.html#build-and-packaging-for-macos

When I copy the Info.plist file from the website(while changing the “YourApp” strings to my game’s name) and then append .app to the parent folder, I keep getting an error saying: “You have macOS 10.14.6. The application requires macOS 10.13 or later.”. Any reason why this might be?

Well I guess it’s the “LSMinimumSystemVersion” line in the plist. You can safely remove those two lines.

Thanks for the reply, but sadly when I removed both of the lines instead of getting the “You have MacOS 10.14.6” error, I got this…weirder error instead: “You have macOS %@. The application requires macOS %@ or later.”. To make it any easier on you to help me here’s my game’s file(with everything in it): Farming Simulator.app

My first guess is that you built the executable just for one specific version of MacOs. This build command will publish for any 64-bit version of MacOs.
dotnet publish -r osx-x64

If that doesn’t help. Here’s a plist I created in the past. Take a look and see if there are any major differences between this one and yours. The LSMinimumSystemVersion I’m using is 11.0

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CFBundleDevelopmentRegion</key>
	<string>en</string>
	<key>CFBundleExecutable</key>
	<string>OrcRaid</string>
	<key>CFBundleIconFile</key>
	<string>OrcRaid</string>
	<key>CFBundleIdentifier</key>
	<string>com.blahblahblah.OrcRaid</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundleName</key>
	<string>OrcRaid</string>
	<key>CFBundlePackageType</key>
	<string>APPL</string>
	<key>CFBundleShortVersionString</key>
	<string>1.0</string>
	<key>CFBundleSignature</key>
	<string>FONV</string>
	<key>CFBundleVersion</key>
	<string>1</string>
	<key>LSApplicationCategoryType</key>
	<string>public.app-category.games</string>
	<key>LSMinimumSystemVersion</key>
	<string>11.0</string>
	<key>NSHumanReadableCopyright</key>
	<string>Copyright © 2021</string>
	<key>NSPrincipalClass</key>
	<string>NSApplication</string>
</dict>
</plist>
1 Like

thank you for trying to assist me in this issue but yet again nothing worked. ive gotten so desperate that i made a 5 minute video showcasing me from building it to creating the plist. heres the link(i hope maybe this will allow you to figure out the issue): monogame help - YouTube

edit: sorry for no audio(oh and i also say “ThisGame.icns” but never add in the icns file in the video but after recording i did add the icns file and it did nothing but add an icon)

Hi. I watched your video. What year is your Mac and what O/S version are you using? I know for a fact that it doesn’t run correctly on Mid-2011 Mac with High Sierra. Other than that, the only thing I would try is to use 11.0 for LSMinimumSystemVersion. If you want, you can send me the .app and I’ll try running it on my machine. I’m using an M1 Mac Mini with Monterey.

1 Like

Hey! I’m using an early 2014 MacBook Air, running on macOS 10.14.6(10.14.6 is the last version that allows me to play 32-bit games). Here’s the .app: ThisGame.app

It’s not working on my Mac either. The file “ThisGame” in the MacOs folder may be suspect. An exec file should show up with a black icon that says exec. This one does not. My first guess is that the “ThisGame” file you included is a 32-bit app and that’s why finder on my 64-bit system doesn’t recognize it as an exec. When I try to open just the “ThisGame” file it doesn’t execute and instead brings up strange characters in a textedit window.

1 Like

Do you have any idea how I would convert it from a 32-bit app to a 64-bit app? Thanks!

Edit: When I go into the MacOS folder and double click the executable it opens the game up with no issues)