Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open a new MonoGame Desktop Project in Visual Studio 2019 Community Edition?

I heard that MonoGame is a replacement for XNA but i do not know how to open the desktop project.

Specifically, what workload should I install to be able to develop MonoGame projects on Windows?

like image 749
Ethan Kharitonov Avatar asked Sep 10 '19 23:09

Ethan Kharitonov


People also ask

How do I get MonoGame in Visual Studio 2019?

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.

How do I open MonoGame in Visual Studio?

Start Visual Studio 2022 and select New Project... in the upper left corner. You should see the "Create a new project" dialog pop up. From here, select the Templates > Visual C# > MonoGame category, and then select MonoGame Cross Platform Desktop Project.

How do you open the MonoGame pipeline tool?

It is accessed by double-clicking a ". mgcb" file from within the Visual Studio solution explorer (providing that you installed MonoGame's Visual Studio extension). Alternatively, you can build it directly from source if needed.

Can I use Visual Studio Code for MonoGame?

Visual Studio Code is a text editor. You can use it on many platforms. With the right setup you can have a good debugging environment for coding your MonoGame projects.


1 Answers

MonoGame v3.7.1 doesn't officially support Visual Studio 2019 but that's only because it doesn't install the Visual Studio Project Templates in the right place.

There are number of workarounds to this issue including this one by uranusexplorer:

I could not find templates for VS 2017 anywhere, so I had to install VS 2017 to get them. Leaving them here until there is support for Visual Studio 2019 in the official MonoGame installer.

Download MonoGame Visual Studio Templates

Unzip to Documents\Visual Studio 2019\Templates\ProjectTemplates\Visual C#

Funnily enough, I actually created a MonoGame Hello World project on github recently for this exact reason. If you just want to get started you can download that project and open it in Visual Studio 2019.

Alternatively you can create a MonoGame .NET Core project which will also work in Visual Studio 2019.

like image 123
craftworkgames Avatar answered Oct 07 '22 19:10

craftworkgames