Setting up your development environment for Windows
This section provides a step-by-step guide for setting up your development environment on Windows.
MonoGame can work with most .NET compatible tools, but we recommend Visual Studio 2022 (prior versions are not supported with MonoGame 3.8.1).
Alternatively, you can use JetBrains Rider or Visual Studio Code.
[Recommended] Install Visual Studio 2022
Before using MonoGame, you will need to install Visual Studio 2022 or later (any edition, including Community) with the following workloads, depending on your desired target platform(s):
- .NET desktop development (mandatory for all platforms)
- Mobile Development with .NET (optional, if you wish to target Android, iOS, or iPadOS)
- Universal Windows Platform development (optional, if you wish to build for the Windows Store, or Xbox)
If you are targeting the standard Windows DirectX backend, you will also need the DirectX June 2010 runtime for audio and gamepads to work properly.
Install MonoGame extension for Visual Studio 2022
To create new projects from within Visual Studio 2022, you will need to install the MonoGame extension, which can be installed from "Extensions -> Manage Extensions" in the Visual Studio 2022 menu bar.
Once it is open, simply search for MonoGame in the top right search window, as shown above, and install the "MonoGame Framework C# project templates" (make sure that it is version 3.8.1 or above). You now have the MonoGame templates installed, ready to create new projects.
Next up: Creating a new project
[Alternative] Install the .NET 6 SDK (compatible with JetBrains Rider and Visual Studio Code)
If you prefer to use JetBrains Rider or Visual Studio Code, and after installing any of them, you will also need to install the .NET 6 SDK.
Once the .NET 6 SDK is installed, you can open a Command Prompt and install the MonoGame templates by typing the following command:
dotnet new --install MonoGame.Templates.CSharp
Next up: Creating a new project