0
votes

I am getting the following error when try to import an xmlschema using datacontract serializer:

Invalid type specified. Type with name 'ArrayOfanyType' not found in schema with namespace 'http://schemas.microsoft.com/2003/10/Serialization/Arrays'.

I know it happened because I am using a List but how would I get around it? by using

knownTypes.Add(typeof(????))

thanks.

1

1 Answers

0
votes

You'd need to share the XSD bit here. My guess is that one of the elements in the schema is of type xs:any. Assuming you meant you are using svcutil to import the info, you need to use svcutil /t:xmlserializer to import the schema.