Oct 27, 2013

How to build xnb files with visual studio 2012 for monogame 3

While doing monogame tutorials, I’ve spent a lot of time on a simple thing that could be useful for someone else. The problem is the following – monogame framework can render xnb assets (images, sounds, fonts, etc), but it has no built in way to compile them yet. It looks like monogame team is working on its own implementation of content pipeline, but its not ready yet.

There is another open source gaming platform – cocos-2dx. In order to get his content builder you need a visual studio extension. So start visual studio 2012 extensions and updates, and search for cocos:

Content builder plugin  After installing it, you will have a new project type – Monogame content builder

Content project type

Now after you build project, it will generate xnb file per each asset added in the project. You can add those as linked files for other projects:

2013-10-27_10-41-29

4 comments:

  1. When I start a new Cocos2D-XNA MonoGame Content Builder project, add some content to it and try to build it, nothig happens. What should I do to get .xnb files?

    ReplyDelete
  2. check "Show all files" (look at the above image. blue, small border on the left side

    ReplyDelete
  3. Was the Cocos project removed? Can't find it anymore.

    ReplyDelete