I have read many versions of how to add assets using the MONOGAME pipeline tool but NONE talk about MONOGAME 3.6 with Visual Studio 2017, at least I haven't found anything so far.

It is not as easy as right click and select and add existing item or add new item. There are add as link, copy to folder, and then setting up parameters in visual studio etc. etc.

Corusera teaches a way of adding a new content.mgcb and going back and fourth and I couldn't figure out why you need a new contnet.mgcb when there is one built already when you open a MONOGAME Winodws project with VS2017.

Is there someone here who can, in point form, explain how to add one png image into a graphics folder to use with a VS2017 project? That will give a head start to work with audio and fonts as only the type will vary. Point form please. I am sure this will benefit many immensly.

These articles tell you to create the Content.mgcb file if it doesn't exist already. They assume that it doesn't exist, for convenience (for example, if you're using the NuGet installation of MonoGame.)

If it already exists, use the existing Content.mgcb. It's already set up to build when you compile/run your game.

Right-click the Content.mgcb file in Solution Explorer

Click "Open With"

A box should come up asking you what to open it with - choose "MonoGame Pipeline Tool".

This will pop open the MG pipeline tool GUI. Right-click in the treeview to the left, click "Add > New Folder". Name it "graphics" or whatever you desire.

It'll add to the tree. Right-click the new folder, click "Add > Existing Item". Find the PNG texture you'd like to add and open it. Then, click "File > Save" in the Content Pipeline.

Then, in Visual Studio, in your game class, add a Texture2D variable to store the texture in. In LoadContent(), add

myTextureVariable = Content.Load<Texture2D>("graphics/myTexture");

Note: Replace "graphics/myTexture" with the asset path to the PNG image you added in Content Pipeline. If you added a PNG file named "smile" to the "graphics" folder, the asset path is "graphics/smile".

You must also omit the file extension of the PNG file in the asset path - so, it's "smile", not "smile.png".

what about the xnb file? isn't adding via the pipeline tool a way to optimze the size of graphics file for monogame? When you reference the png files directly does VS use the pngs themselves or are theycompiled to xnb files? Dont you have to add the xnb files to the Content folder in the solution explorer?

If you start your project from one of the templates that MG provides, the .mgcb file will have a build action of MonoGameContentReference. That build action will check if a rebuild is needed (i.e. new or modified content) and then copy all xnb's to your output folder. There's no need to add the .xnb files or source files to your project or copy them to the output folder manually.

this works. The graphics folder does not show up in the solution explorer pane but it builds without errors and the sprites are drawn. Still a bit weird but does the job.

Thanks,Stephan

Probably a really late reply, but...the reason the graphics folder doesn't show up in your Solution Explorer in Visual Studio is because...it simply doesn't need to be directly used by your solution. Only the Content.mgcb file needs to actually be in the Solution Explorer with the relevant build action. The .mgcb file contains a list of file paths to various content files in your game, and how they should be imported and processed.

So all your Visual Studio project needs to do is say "OK, MonoGame, this is a Content.mgcb file. I've been told to tell you to build it. Can you build it?". MonoGame will then look at all the paths in that file, process everything into .xnb files, and copy them over to the right spot in your game's output. That's why Visual Studio doesn't show your other content files - it doesn't need to know they're there.

But that's also why you get some vague compiler errors in Visual Studio when MonoGame fails to process all your content. Usually I tend to build my stuff in the Pipeline GUI and get the actual error details when working with HLSL shaders.

In conclusion, it's not Visual Studio building your content - so your content won't show in Visual Studio as part of your solution. Instead, MonoGame keeps track of your content on its own - only you and MonoGame need to know where the files are.

Quick edit: If you really want to see your content files in the Solution Explorer, you can click the "Show all files" button - it looks like a stack of papers in the Solution Explorer's toolbar.

the music code is just a class that uses "songs" if android and uses native UWP functions to get around the sharpdx.multimedia bugs

The other thing is it only seems to crash using the VS Emulator, on an actual Android device it works fine, i'm looking into the emulators now as I need to check on various devicesbut if you have any ideas let me know