Creating Cross-Platform MonoGame projects

As of the MonoGame 3.5 release, circa mid-2016, there’s a lot of confusion around how to create a single, cross-platform MonoGame solution that gives you executables for Windows, Linux, and Mac.

Do you need one solution per platform (eg. a Windows project, a Linux project, and a core/shared project)? Do you need to use PCL? Do you need to maintain two solutions, and add code as references? Do you need to use ProtoBuild or other tools?

The answer is pretty simple: MonoGame 3.5 introduced something called the “DesktopGL” project, which is cross-platform. You get one executable out of it, which runs on both Linux and Windows. On Linux/Mac, it uses Mono.

If you install MonoDevelop (on Linux), you won’t see a DesktopGL project template; only a “MonoGame Cross Platform Desktop Project” template. This is, indeed, what you want.

About Ashiq Alibhai, PMP

Ashiq has been coding C# since 2005. A desktop, web, and RIA application developer, he's touched ASP.NET MVC, ActiveRecord, Silverlight, NUnit, and all kinds of exciting .NET technologies. He started C# City in order to accelerate his .NET learning.
This entry was posted in Libraries and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *