The problem was solved, after much trial the slution was adding
using System.Xml.Serialization;
to the header of the .cs file. It seems that even though the assembly was imported, it couldn't use the XmlSerializer without specifying that I'm using it's assembly.