Translate Windows XNA game to Monogame.

I am a teacher and have followed a book to make some lessons.

We have used Windows game (Windows game(4.0)-template).

On Windows you have the “Extra project” for content. I´ve tried to use the Monogame Windows OpenGL project. There is a content-folder but I couldn´t get it to work using that instead.

Get Content.ContentLoadException. Put a folder in Content and tried this in load:

ship_texture = Content.Load(“Content/Images/Player/ship”);
//ship_texture2 = Content.Load(“images/Player/ship”);

ship is a png-image.

Do the following:

  1. Add your texture to “Content” folder
  2. Go to Properties for it and make sure that “Build Action” is set to “Content” and also find and set “Copy to Output Directory” to “If it’s newer”
  3. Now in load content just load the file by typing “Content.Load<Texture2D>("ship");” and it should work

If you are still having any difficulties porting, just put a link to an example code you want ported and I’ll help you out.

Thanks, I’ll try that!