MonoGame development on macOS

As MonoGame 3.8 went full .NETCore, you don’t even need a IDE to start making games on any desktop platform, including on a Mac. (High Sierra and up!!)

Firstly install .NETCore 3.1 for Mac: Download .NET Core 3.1 SDK (v3.1.404) - macOS x64 Installer

Once installed, go to terminal and type to install the templates:

dotnet new -i MonoGame.Templates.CSharp::3.8.0.1641

Choose a location to create your monogame game project and type:

dotnet new mgdesktopgl -o YourGameFolderName

Then go to your newly game folder location:

cd YourGameFolderName

Install monogame content builder:

dotnet tool install --global dotnet-mgcb --version 3.8.0.1641

Install monogame content builder editor:

dotnet tool install --global dotnet-mgcb-editor --version 3.8.0.1641

Register it:

mgcb-editor --register

Open the mgcb-editor to manage and build your game assets: sprites, sounds, music, etc.

mgcb-editor

Then you simply type to build your game:

dotnet build

Or/and type to run/test your game:

dotnet run

and then finally publish the game to any desktop platform you want:

dotnet publish -r osx-x64 -c Release

dotnet publish -r win-x64 -c Release

dotnet publish -r linux-x64 -c Release

EDIT: You also can build a single file for distribution adding /p:PublishSingleFile=true at the end of the line. Ex:

dotnet publish -r osx-x64 -c Release /p:PublishSingleFile=true

Then just go to YourGamerFolder/bin/release folder and the binary is now ready to distribute :slight_smile:

MonoGame also supports iOS and Android, but it relies on Xamarin, so development using Visual Studio for Mac will be mandatory. Hope it helps!

4 Likes