Monogame Content Project vs Pipeline.exe

What’s the difference between creating a Monogame Content Project and bulding your assets inside Visual Studio or Xamarin Studio and using Pipeline.exe? Do they both use MGCB.exe internally?

My workflow is this: I create a Monogame Content Project then start adding files to it. Textures, sounds, mp3s… I set the Content Processor to be MonoGame Texture or MonoGame Song, etc. Then I build for say, iOS and Android. With an MP3 I get a an mp3 and xnb for iOS and a wma and xnb for Android, which tells me that it’s working and not using XNA content processors.

But, for example if I use Pipeline.exe to build my content, on Android and iOS I get mp4, Windows a wma, and Linux raises an Exception trying to encode to Ogg Vorbis.

Are the two things (Monogame Content Projects vs Pipeline) complementary or do you use one or the other?

Tom will better be able to answer this, but I do believe that the content projects use MGCB internally. My personal preference is to avoid content projects, as Visual Studio’s often-incorrect dependency checking often causes content to needelessly be rebuilt, wasting time…at least this was the case with XNA. I moved away from content projects before moving to MonoGame.

The “MonoGame Content Project” template project that you can create within Visual Studio will go away in the coming months. These .contentproj projects depend on you having XNA4 installed on your system and are not portable to other desktop platforms.

Instead we’re moving to our own format and tools for content projects. MGCB is the compiler for these projects and Pipeline is the GUI editor.

That is something we’re looking to specifically improve upon. XNA should have never triggered content rebuilding from code rebuilding… it is extremely rare that you hit rebuild and actually want to rebuild all content too.

And when you make that mistake… it can be costly. C# builds extremely fast even in AOT cases, but content building on bigger projects can take a very long time. One fat fingered rebuild can loose you a half hour of productivity.

So while we’ll be adding hooks so that your game project in Visual Studio or Xamarin Studio can trigger MonoGame content building, it will not clean and rebuild content when you rebuild code.

Ok, thanks for replying.

So basically if I were to start a MonoGame project today, my best bet would be to use the latest develop branch, and just create a content project (MGCB) using the Pipeline tool.

That might be best for you. It all depends on your timelines to ship your game and if you run into any problems with the new pipeline. While we’re working hard, the new stuff is still very new, you might run into problems and you might be blocked for a bit while we fix them.

I saw this tool when rummaging around in the repo for MonoGame. I think it’s a great tool personally, but what bothers me is that I have to work outside of VS in order to make use of it. Have you considered implementing some kind of custom project type for VS that works in a similar way to that of XNA’s Content Project?

We specifically avoided that path in order to make a tool that works on Mac and Linux as well as Windows.

Instead we’re working on some integration into VS that will automatically build your content from a Pipeline project. So all the convenience of how XNA worked before, but with a dedicated stand alone editor tool.

Nice.

I’d be intrigued to see how that gets implemented. :smile: