0
votes

I am trying to use Monogame for the first time.

I found creating a content project is impossible on Visual Studio 2012, so I would like to know if I can create some .xnb (contents) files from another PC and move it in my PC that Visual Studio 2012 is installed.

This is because I failed to install Windows Phone SDK in my PC for some reason. My OS was Windows 7 so I could not install Windows Phone SDK.

So, is it possible to create a content project on another PC and move it into my PC? Or, can I copy the .xnb files to my PC?

Thanks in advance for your help.

1

1 Answers

0
votes

You can create the xnb files from whichever system you want by using an XNA game project.

The steps to follow would be:

  1. Create a new XNA Game project (it needs to be a game and not a content project).
  2. Add the assets you want to port into the content project of the game.
  3. Compile.
  4. Go to the output folder and copy all the xnb files.
  5. In your monogame project, add the existing xnb files to the project's Content folder.
  6. Change their properties to: "Content" for "Build Action" and "Copy if newer" for output directory.

enter image description here

You can find a tutorial (written by me) explaining exactly how to use sounds and spritefonts in Monogame here. This can be helpful given that these files need to be created from an external project as Monogame was not able to used them without being in xnb format; and was also unable to create this format for itself.

One last thing, it is also possible to install XNA in VS 2012/2013 and Windows 8/8.1 without any problem by using XNA Refresh. This may help you in avoiding the need to use another computer for this process.