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).
- Download and install from: https://dotnet.microsoft.com/download/dotnet/8.0
- After installation, verify with:
dotnet --version
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 Project → MonoGame 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
- Official Documentation:
docs.monogame.net — Comprehensive guides, API references, and getting started articles. - Community Guides:
learn-monogame.github.io — Step-by-step tutorials and practical examples. - MonoGame.Extended Docs:
monogameextended.net/docs — For advanced features and utilities.
To run your game:
- In Visual Studio, press F5.
- With the CLI, use
dotnet run
in your project directory.
Next Steps
- Explore the MonoGame documentation for more advanced topics.
- Try out libraries like MonoGame.Extended to add features like tile maps, cameras, and UI.
- Join the MonoGame Community for support and inspiration.