Whenever I try to load a simple PNG image I get the error “could not load a asset as a non-content file”. I run Xamarin Studio on OS X and the project is just the basic MonoGame Mac Application template. The steps I followed were:
- Open Content.mgcb using the Content Pipeline Tool
- Add the image file (simply called “a”) and set its BuildAction to “Copy” (otherwise build fails)
- Save and then build the file
The build succeeds, but I get the aforementioned error when I add this code and run the project:
Texture2D a = Content.Load<Texture2D>("a");
I read something about needing to add a .xnb file to the project, but it doesn’t seem like such a file is being generated. Other sources completely ommit any mention of the .xnb or even the need to build the .mgcb file in the first place.
So, I’m pretty confused right now about how I’m supposed to use the content pipeline. Can anyone help clear this up?