Asking about the Monogame framework

Hi, I just wanted to ask a question about the framework.

If a user wanted to play a mono game, is there anything else they need to install on their computer? Just like you need to install XNA redistributable in order to play XNA game, are they need to install Monogame framework too?

And if the Monogame framework is required, is there any other way around to let the user can play the game without install the framework? Like I ship all the dll file along with main game in the game folder.

Sorry for my bad English, and I’m new here so I may post the topic at wrong section, hope everyone is fine with it.

It’s a good question, I’d also like to know the correct answer.
If you build for “DesktopGL” which uses the OpenGL render backend, the user at least needs support for OpenGL 2.0, but I don’t know if the user needs to install anything?
I found this post about OpenGL
OpenGL prerequisites

If you build for Desktop DirectX, I’m pretty sure the user needs to have a specific version of DirectX installed.
I hope someone more knowledgeable will chip in :slight_smile:

Hi @Chan_se, Welcome to the Community!

While I do not have a concrete answer to this, the short answer is, when you package your game [export] you can choose to include all requisites.

Hope this helps.

Happy Coding!

MonoGame does not need to be installed the way XNA needed to be, a DLL will be packaged with your game.

There are prereqs-ish depending on build target. The easiest (and most reliable) way to handle this, is to build/publish your game using the “–self-contained” flag. Doing so will output a package you can distribute that will contain your game, MG, ref libs, even .NET stuff. This will make your build larger, but means your end-user doesn’t need to install .NET prereqs or worry about what versions they have.
dotnet publish -c Release -r win-x64 /p:PublishReadyToRun=false /p:TieredCompilation=false --self-contained

Main notes:

  • DX builds will still need the end-user to have DirectX installed (June 2010 runtime, specifically)
  • GL builds don’t need any other prereqs. Simply need to run on a machine supporting OpenGL.

Find more info in MG’s packaging and supported platforms docs.


Thanks everyone, that’s a great help

1 Like