(FIXED) Monogame Content Pipeline Tool can't build XML files

I’m having a problem building some XML files for a game using Monogame v3.5 content pipeline tool. I have two projects specifically for data - one for generic data classes and ones for specific data classes - which I then reference into my game.

All the XML files which use the ‘generic’ data classes build correctly, but the XML files which use the game specific data classes do not. I have added references to both project dlls in my .mgcontent project; also, the game specific data project references the generic data project.

I obtain the following error when building using the pipeline tool:

Importer ‘XmlImporter’ had unexpected failure!
Microsoft.Xna.Framework.Content.Pipeline.InvalidContentException: Could not resolve type ‘SpaceCardGameData.SpaceBackgroundData’

The Xml file for the above failed file is:

<XnaContent> <Asset Type="SpaceCardGameData.SpaceBackgroundData"> <AsteroidTextureAssets> <Item>Objects\Asteroids\TinyAsteroid</Item> <Item>Objects\Asteroids\SmallAsteroid</Item> <Item>Objects\Asteroids\LargeAsteroid</Item> <Item>Objects\Asteroids\HugeAsteroid</Item> </AsteroidTextureAssets> </Asset> </XnaContent>

and .cs file is:

namespace SpaceCardGameData { public class SpaceBackgroundData : BaseData { public List<string> AsteroidTextureAssets { get; set; } } }

(Base Data is an empty class in the ‘generic’ project I just use as a base type for templating and so forth).

Does anyone have an idea why the XML files for one project are working, but not for the other. If you wish to see anything else, I will upload it. Thanks.

Maybe because it is an “empty” class ? I remember having read in other same topics the xml is serialized and “binded” to members of a class

So the BaseData class is empty, but the class I am trying to build is not. Also, as I mentioned, all of the xml files which uses data classes from one project (which also inherit off of BaseData) build correctly.

I’m more inclined to think it’s something to do with the references within my whole solution, but they all seem to be set up correctly from what I can tell.

It turns out that the project with the data files that were not working was not a true Windows class library, but rather a Monogame project where I had deleted the Game.cs class to save myself having to add references. This is what broke it. Data projects MUST be true Class libraries it seems.