MonoGame and Visual Basic

All I have installed is windows 10 (required for win 10 uap), visual Studio 2015 with win 10 sdk, xamarin studio (for ios and
Android), then the monogame sdk

Thanks Vogles for the PR, I’m sure it would help others, not just troublesome me ;o)

Just in case you havent actually seen my templates:

If you dont trust the installer you can create the Visual Basic Templates folder yourself in “(My Documents)\Visual Studio (X)\Templates\Project Templates\Visual Basic”

and place these inside.

extract the zip files LEAVE those as zip files.

Hopefully I’ll get a chance to try this tomorrow, I’ll post back when I’ve given it a go. I think I can trust the installer! ;o)

Hi there.

I ran your installer and selected 2015. Where should I see the project type in the New Project window?

I have in there a MonoGame GameName1 template, but I think that is what I manually put there the other day from another download as the Game1 doesn’t include any imports for MonoGame, only XNA. This is what I used to get started a few weeks ago, not realising it wasn’t Mono!

I did have a lap top I could have tested on, but due to a burglary a few days ago I don’t have that any more.

you only had to have 3.4 installed or 3.5 i guess… all it does is makes it when you start up VS with VB.net you get an extra listing under the visual basic tag on the categories stuff, it says MonoGame and you make a Windows, WindowsGL, Linux etc for project. It has all the exact same imports that the C# edition does. If you dont have the MonoGame installed for the normal C# the templates will be trying to reference files that dont exist (I did not package the mono game files with it because its just code templates which arent limited to one specific monogame version)

I definitely have Monogame 3.4 installed. But I don’t see any Monogame in the New Projects list under VB. Where does your installer put the files? I have read there can be problems with Win10 and default file locations with VB.

However, using the template source files I am able to open then project without any errors. I’ll open each one and Export then as templates, this creates a New Project listing if you ask it to. Thanks for this, really, really appreciated.

Just one question, although there is a Monogame Reference, there are no imports for MonoGame in the Project, only XNA imports. Is this right?

There are a few things that make me wonder if I’m actually referencing Monogame in the correct way. For example sounds are a real issue. According to the help files I can find online a .wav file in the content folder should have a Content Importer property, but they don’t.

Sorry for the late reply… I am using windows 10 myself. The file locations shouldnt be a problem. When visual studio loads, and you go to grab Project templates, it looks in your documents(or in some cases the OneDrive), whatever your pc deems the active “Documents” folder. Then looks for Visual Studio, the templates folder etc.

I had my vb template installer look for the same thing(in the same way, where it found OneDrive/Documents intstead when the thing is used) and places the templates in there. If you get the C# templates, and have ran the template installer for vb, it will be in the same location.

From there, you dont directly see on the giant list of all templates the VB mono stuff, youll see on the drop down list a new menu item called MonoGame and clicking that will show you the proper templates.

PS: my thing is designed to detect the location similar to how vs detects the places as well so they always target same place.

“Just one question, although there is a Monogame Reference, there are no imports for MonoGame in the Project, only XNA imports. Is this right?”

MonoGame uses Microsoft.Xna.Framework namespace. It doesnt have alot under “MonoGame” namespace or imports as you are familiar with. So yes, it should say all xna imports. This was because MonoGame was a compatibility project, designed after XNA.

So, where does MonoGame actually fit into the sequence if I’m still using all xna references?

The references are to the MonoGame specific assemblies, it’s just the import statements that match Xna to ensure the same code will compile regardless of which assemblies are being referenced. Very useful in cross platform projects!

Ah right, ok. That makes sense.