Setting up your development environment for Windows
In this section we will go over setting up your development environment for Windows.
Install Visual Studio 2019
You will need a copy of Visual Studio 2019 or later installed (any edition, including Community) before installing MonoGame, with the following components (depending on your target platform):
- .NET Core cross-platform development - For Desktop OpenGL and DirectX platforms
- Mobile Development with .NET - For Android and iOS platforms
- Universal Windows Platform development - For Windows 10 and Xbox UWP platforms
- .Net Desktop Development - For Desktop OpenGL and DirectX platforms to target normal .NET Framework
If you are targeting standard Windows DirectX backend, you are also going to need the DirectX June 2010 runtime for audio and gamepads to work properly.
Install MonoGame extension for Visual Studio 2019
To create new projects from within Visual Studio, you will need to install the Visual Studio 2019 extension which can be found in "Extensions -> Manage Extensions" in the Visual Studio menu bar.
Once open, simply search for MonoGame in the top right search window (as shown above) and install the "MonoGame project templates". You now have the MonoGame templates installed ready to create new projects.
Install MGCB Editor
MGCB Editor is a tool for editing the .mgcb files, which are used for building the content.
To register the MGCB Editor tool with Windows and Visual Studio 2019, run the following from the Command-Prompt.
dotnet tool install --global dotnet-mgcb-editor mgcb-editor --register
[Optional] Install MonoGame templates for .NET Core CLI or Rider IDE
dotnet new --install MonoGame.Templates.CSharp
Next up: Creating a new project