Contents

Getting Started with MonoGame: Installation and Documentation

MonoGame is a powerful, open-source C# framework for building cross-platform games. This guide will walk you through installing MonoGame, finding documentation, and creating your first simple game.


Don’t know what is MonoGame framework ? Check this post.

How to Install MonoGame

1. Install .NET SDK

MonoGame requires the .NET 8 SDK (or newer).

2. Install an IDE

MonoGame works with Visual Studio, JetBrains Rider, or VS Code. Visual Studio 2022 Community Edition is a popular, free choice.

3. Install MonoGame Templates

You can install MonoGame project templates with the following command:

dotnet new -i "MonoGame.Templates.CSharp"

4. Create a New Project

To create a new cross-platform desktop project, use:

dotnet new mgdesktopgl -o MyFirstMonoGame
cd MyFirstMonoGame

Or, in Visual Studio, select New ProjectMonoGame Cross Platform Desktop Project.

5. Install the Content Pipeline Tool (Optional, for assets)

dotnet tool install -g dotnet-mgcb-editor
mgcb-editor --register

Where to Find MonoGame Documentation

To run your game:

  • In Visual Studio, press F5.
  • With the CLI, use dotnet run in your project directory.

Next Steps

Sources