I am trying to port an old XNA project to Mono and everything except the Content Serializer has worked without problems.
From what I see, it looks like the “ContentSerializerIgnore” compiler flag is not respected.
When I try to compile the following xml file:
<?xml version="1.0" encoding="utf-8" ?>
<!-- TODO: replace this Asset with your own XML asset data. -->
to match Class1
public class Class1
public string AAA = "MaString";
public int BBB = 11;
the following compiler error is displayed.
Error 1 XML element "BBB" not found
How can I work around this? Is there a fix?
I would like to contribute my workaround for this problem, whatever value it might have:
Create a web service from which the game/program gets the data.
The web service stores the files as binary data in it’s database, and all the game does is consume the web service’s data where it would normally instantiate the serialized data from the file system.
This solution was acceptable to me, because I already had a web service implemented and mono/xna has got no problems sharing the same web service.
@JamesLupiani - Is this something we need to fix in the XmlImporter?
Ignore and most of the attribute-controlled options aren’t implemented yet. It should be trivial to add, though. @casperv: Also, I noted some other not-yet-implemented features here: https://github.com/mono/MonoGame/pull/2380