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

13 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
  4. This comment has been removed by a blog administrator.

    ReplyDelete
  5. I have read your blog it is very helpful for us. I couldn't find any knowledge on this matter prior to. Thanks for sharing this article here.
    web design company
    website designer near me
    web development company

    ReplyDelete
  6. This very informative and interesting blog. I have read many blog in days but your writing style is very unique and understanding. If you have read my articles then click below.

    best digital agency toronto
    website designer near me

    ReplyDelete