How to Install MonoGame

How to Install MonoGame

This article will cover how to set up the MonoGame framework for game development.

Info
MonoGame recommends using Visual Studio Community for development - the setup of which is covered in this article. You can, however, use other code editors like Visual Studio Code. For information on installing Visual Studio Code, please see this article: How to Install Visual Studio Code

Installing Visual Studio Community

For working with MonoGame, we'll be using Visual Studio Community. In this first section, we'll install Visual Studio Community itself.

1. Head to the Visual Studio downloads page at https://visualstudio.microsoft.com/downloads/
2. On the downloads page, select the "Free download" option for the Community version. Your operating system should be automatically detected for the right download version.



3. Double-click the downloaded file to start the installation process. Make sure when picking Workloads that you choose to install the .NET desktop environment.



Installing the MonoGame Extension

In order to run MonoGame in Visual Studio Community, we need to install an extension.

1. Launch Visual Studio Community (once its installation is complete).
2. From the file menu bar, select Extensions > Manage Extensions.



3. In the new window, use the search bar to locate the MonoGame template. Once located, hit the Download option.


4. Close the editor and run through the installation process for the MonoGame extension.


Creating a MonoGame Project

With our installation steps done, we just need to create a MonoGame project.

1. Launch Visual Studio Community again and select the "Create a new project option".



2. Search for MonoGame and choose the option "MonoGame Cross-Platform Desktop Application".



3. Enter a name for your project, choose a location, and hit create. Your MonoGame project is now ready to go!