I have VS 2015, 2017, 2019 running on Windows 10. I’ve run the MG installer several times (both 3.7.1 and the dev build), and none of my versions of VS have New Project templates for MG. I’ve tried installing with VS closed and with VS open. I’ve rebooted, and I’ve re-installed VS 2017 from scratch. Nothing is working. I have no MG “New Project” templates.
All MG documentation that I’ve found relies on the installer working. Since it doesn’t work for me, I’m out of luck and cannot figure out how to work around this.
I would like to know how to create a MG project from scratch. I do this all the time with other frameworks – start a console app, add projects X and Y, add references to those projects, etc etc. But MonoGame has some magic in a few places (e.g., pipeline tool & copying assets) that I’m not sure how to duplicate.
Are there any docs or tutorials that explain how to set up a project for MG completely from scratch? Or some way to get the installer to work properly?
Any luck so far?
Have you got one of those daft antivirus programs restricting folder access during install?
Focus on the VS17 folders, have you looked inside the Visual C# folder?
Documents\Visual Studio 2017\Templates\ProjectTemplates\Visual C#
And run VS17 for the setup templates.
Thanks for your kind reply, @MrValentine. I checked out the directory you mentioned and the zip files are there. Just to test, I deleted them and re-ran the MG installer, which put them all back. So the installer is working. Yet, oddly, I cannot find any of the templates when I run VS 2017 and start a new project. I enter “monogame” in the search box, but nothing comes up.
In the meantime I took a 3-year-old MG project of mine, copied it, renamed some things in the .sln and .prj files, and generally messed with it until it worked. Of course that’s using a really old version of MG, so I’d love to figure this out somehow.
Can’t you just expand the zip files?
Expanding the zip files won’t work 100% because there’s no .sln file in there, plus a “magic” MonoGameWindows.vstemplate file that is interpreted by VS when creating a new solution. It’s probably not hard, though, to piece the solution together with the files that are there.
But I did manage to figure out the problem. The MonoGame installer put the templates in my D:\Documents\Visual Studio 2017\Templates\ProjectTemplates\Visual C#\MonoGame folder, but apparently my version of VS 2017 looks for templates in my C:\Users\USERNAME\Documents\Visual Studio 2017\Templates\ProjectTemplates\Visual C#\MonoGame folder. Once I copied the zip files from the 1st to the 2nd, and restarted VS, the New Project templates were there … huzzah!
Thanks again @MrValentine for taking the time to answer!
Just for the record, I believe the MG installer is performing correctly, and VS 2017 was looking in the wrong place. I don’t know how that happened, but it’s easy to fix. In VS, go to Tools / Options / Projects and Solutions / Locations, and change the User project templates location accordingly.
As to how or why I have two Documents locations, or how to fix it, that’s beyond the scope of this forum, but it’s easy enough to google.