Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to compile a monogame game into a single .exe? I know if you go in the debug or release bin, there is in fact a .exe your game, except you move this .exe's file location or try to run in on another computer it crashes. I am also aware of the one-click application except this seems like a really messy way of redistributing a monogame game. How come when you build your game, the exe for it wont work anywhere but that file location and that computer. I am also aware that the computer probably needs the XNA framework downloaded to play the monogame game, so in short is it possible to redistribute a monogame game by creating a single .exe and assume that person who is using it doesnt have XNA or monogame installed?

share|improve this question

closed as too broad by Josh Petrie Nov 11 '14 at 17:21

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

Please don't, this is why installers were invented. There are multiple free and well supported installers such as Windows Installer XML if you need a way to distribute your game. Most such installers allow you to install supporting libraries iff they are not already installed. Also monogame is not built on top of XNA its build on top of a managed DirectX wrapper so XNA is not a requirements. I think SlimDX and OpenTK are though/ – ClassicThunder Mar 26 '13 at 19:23
To correct my self it is SharpDX not SlimDX. – ClassicThunder Mar 26 '13 at 20:08
It seems to me that the question you are really trying to ask is "Why does my game crash when I run it on another computer?". More specifically, you need to provide information about the crash. What exception is thrown? The other part of your question is "How do I create an installer that has the required MonoGame dependencies in it?". If you can do that, you won't have any need for a single exe (which btw isn't easy, maybe impossible). – craftworkgames Mar 26 '13 at 22:54

You can use tools like

There is also an application that I personally used: SmartAssembly ( Even thought it says it's an obsfucator, you can use it just to pack every .dll and the main .exe into a single .exe.

However, please note that the 'Content' folder which contains the game assets will need to be held alongside with the single .exe file.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.