Tutorial for setting up monogame on m1/m2/apple silicon

It took me a couple hours to get the tutorial running on my m2, so I thought id share the steps how. Hopefully we can add this to the official documentation.

I’m also using jetbrains rider as my IDE

Download the installers for the arm and x64 version of the .NET sdk

The mgcb content editor doesn’t work without using the x64 version

at the end of your .zshrc or bash or whatever your using set this

export PATH="/usr/local/share/dotnet/x64:$PATH"

You’ll also run into a free image error to solve that you need to install homebrew and then run

brew install freeimage

and then link it

sudo ln -s /opt/homebrew/Cellar/freeimage/3.18.0/lib/libfreeimage.dylib /usr/local/lib/libfreeimage

1 Like

Is it possible for you to do the same with .NET 8 or it’s not compatible yet?

Edit:
I manage to make it work with .NET 8 and mgcb 3.8.1.303
Just by adding the line bellow in my .zshrc

export PATH="/usr/local/share/dotnet/x64:$PATH"

I am left with the following log info in my project

2024-04-18 14:05:07.940 [info] .NET SDK for X64 CPU may have been installed on an Apple computer with Apple CPU, which does not work with C# Dev Kit. Please uninstall it and reinstall SDK for ARM 64 platform before using C# Dev Kit. A reboot might be necessary after installing the new SDK.
2024-04-18 14:05:09.164 [info] Project system initialization finished. 0 project(s) are loaded, and 1 failed to load.