When attempting to use components generated using the Workflow XML Schema Generator an error similiar to the following may be encountered:
System.InvalidOperationException: There is an error in XML document (1, 23). ---> System.InvalidOperationException: <LinkResources xmlns=''> was not expected.
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderlink.Read3_link()
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader)
at Generated.Graham_XML_Generator.linkRead.Run(IData data)
ITMS 8.x
Workflow 8.x
In all instances where this has been seen the cause of the issue is the Workflow XML schema file (XSD file) used in the component generation not being formatted properly for the XML file being read by the component.
The solution is to generate a new XSD file using the XML file you are attempting to parse as a template. Once this has been done, recreate the Workflow XML Schema Generator components using the new XSD file.
Generating a new XSD file can be accomplished using Microsoft Visual Studio using the instructions below. Note: If you do not have Visual Studio the free Express versions that Microsoft offers can be used as well.
Now, run the XML Schema generator wizard in Workflow again, but this time generate against the newly-created .xsd.