Getting Your XNA Content Pipeline into your MonoGame Project

August 31st, 2012 Leave a comment Go to comments

I wanted to test the waters of MonoGame, so I followed Bob Familiar’s steps on getting MonoGame up and running on Windows 8. The trickiest part of the whole process is MonoGame doesn’t currently support the ContentPipeline project type. Therefore, you need to jump over to XNA Game Studio 4.0 in Visual Studio 2010 to compile your content pipeline into a .XNB file and than import that file into your MonoGame project. (Note: you can get the XNA Game Studio 4.0 by installing the Windows Phone 7 SDK and Tools). Part 3 of Bob’s series outlines the steps to create your content pipeline file (.XNB) and import it into your MonoGame project.

For me, it looks like the MonoGame.Framework.Windows8 project must have been updated since Bob’s post as I had to modify the steps slightly. Instead of copying the .XNB file into the MonoGame’s \bin path, place the .XNB into a folder called ‘Content’ in your project.

1.) Create a folder called ‘Content’ in your MonoGame Project.

2.) Right-click on ‘Content’ folder and select Add | Existing Item.

3.) Browse to the location of your compiled .XNB file (ie. $(ProjectPath)\bin\x86\Debug\Content) and add the .XNB file to your Content folder.

4.) In the Solution Explorer, select the .XNB file and set the File Properties to: Build Action = Content, Copy to Output Directory = Copy Always

image

After this simple step, everything is humming along nicely in MonoGame. Now its time to take my XNA skills and create some games to sell in the Windows 8 Store!

  • Pingback: SpriteSheet Animation in MonoGame for Windows 8 - Dave Bost

  • Dave Ferreira

    Hi Dave. Thanks for this helpful blog post.

    One question on a level above this: Is it true that we can use MonoGame to create a Windows 8 Metro App (faux XNA) that can be sold in the store? (This is what a contractor told us AND your blog posting here seems to reinforce.)

    Thanks!

    • davebost

      This is correct. MonoGame is an open-source implementation of the XNA API’s and it runs on Windows 8! The MonoGame Team is doing a fantastic job and covering a gap in the Windows 8 game developer story that is sorely needed.

  • bradrobnett

    Thank you Dave! The steps you laid out were exactly the ones I was missing. My game runs in MonoGame for the first time now.

  • Sulaeman Santoso

    Hi dave, thanks for this very useful post.

    i just want to ask you a few question

    how do you add custom content that had custom importer and custom processor to monogame project ? can i do that ? or should i code it again and attach the raw resources on my monogame project ?