Edit: I formatted my LevelData field arrays wrong, which explains the build error. However, the IntermediateSerializer assembly is no where to be found.
I'm currently attempting to import xml files in the Content Pipeline. After adding the necessary class library reference to the project and reformatting my xml file, I'm still encountering issues with the import being unable to find class fields. Looking at others' code with similar issues, I don't understand what I'm doing wrong.
C:/Users/MyName/Source/Repos/MonoGame/ProjectName/ProjectName/Content/Levels/Level1.xml: error: Importer 'XmlImporter' had unexpected failure!
Microsoft.Xna.Framework.Content.Pipeline.InvalidContentException: The Xml element `Metadata` is required!
Here is the xml file:
And here is the LevelData class:
public class LevelData
public int layout;
public int Metadata;
I figured that writing a test class to a file would be the easiest way to understand how to format the input files correctly.
var test = new LevelData();
var sb = new StringBuilder();
using (XmlWriter writer = XmlWriter.Create(sb))
IntermediateSerializer.Serialize(writer, test, null); //IntermediateSerializer does not exist and won't compile.
However, when I went to do so, I could not use the IntermediateSerializer class as I didn't add the correct "using" statement. However, Microsoft.Xna.Framework.Content.Pipeline simply does not exist. The only available namespace is Microsoft.Xna.Framework.Content. Am I missing something glaringly obvious here?