1

I'm getting a XmlSerializer error when I serialize an object with a refrence to an early-bound CRM entity. Have you seen anything like this and/or have any thoughts on how I can correct?...

{"Cannot serialize member 'DataSync.ParseI17Xml.CrmEarlyBound.sevp_petition.sevp_petition_ActivityPointers' of type 'System.Collections.Generic.IEnumerable`1[[DataSync.ParseI17Xml.CrmEarlyBound.ActivityPointer, DataSync.ParseI17Xml, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]', see inner exception for more details."}

Is the problem that it can't serialize IEnumerables? I'm not sure.

Thanks for your advice! :-)

Locohost
  • 1,682
  • 5
  • 25
  • 38

2 Answers2

0

Try converting it to a List first using .ToList().

There was another answer for the same here

Community
  • 1
  • 1
Jordi
  • 1,460
  • 9
  • 9
0

So I worked this out. It ended up being easier than I thought. The solution was to use a different serializer. The DataContractSerializer works perfectly.

Serialize CRM entity using DataContractSerializer

I hope this helps someone :-)

Locohost
  • 1,682
  • 5
  • 25
  • 38