Coming from XNA. How do I automate the content pipeline?

I’m getting back into XNA after a few years break and I thought I’d give Monogame a try now because of the cross-platform support and DirectX 11 etc. etc. etc.

But I’m finding the new content pipeline to be extremely irritating.

With XNA I could just drag-and-drop .png files into my Visual Studio solution and it just kinda worked with me sometimes having to specify that I wanted mipmaps generated if necessary. No faffing around.

What I would like to be achieve now in Monogame is to have all the content in a folder be parsed as content instead of having to use the MGCB editor to manually add each file? Is there a way to achieve that? Just say “Hey Monogame, everything in this folder and subfolders is content and should be treated as such. Please automatically treat this as content and build everything in here as content but if I want to I’ll mess around with it in the MGCB Editor”.

This isn’t a case of porting an XNA project to Monogame. I know that I can use the XNB files or use the .contentproj file. I’m starting a new project and I’m finding the content management to be a sticking point in my workflow.

Any help would be appreciated!

Only way I can think of is to write your own tool.

Look at the properties of any item in the content folder from within VS and you can see an entry for “custom tool”

You could write your own tool to add the asset to the XML file used by the Monogame content manager and trigger it to build the content.


By XML do you mean add it to the .mgcb file or the .mgcontent file?

There’s GitHub - Martenfur/Nopipeline: A Monogame Content Pipeline enhancer. which I think does exactly what you want.

Oh cool! Thanks that looks like a solution, at least until I get up and running! Thanks!

I’ll try to remember to update this thread when I do a custom workaround.

I know I’m late to the party, but this is related to a question of my own which I will post separately.

I was reading into the content pipeline documentation, and this section which suggests including asset files with wildcard seems to be what you might be looking for, although Nopipeline seems even better:

[Using MGCB Editor | MonoGame Documentation](https://Using MGCB Editor | Add With Wildcard)

  <Content Include="Content\**\*.xnb">