Using LLBLGen 4.0, Self Servicing, runtime version 4.0.13.0417
Code that worked fine in 3.5 to serialize and deserialize EntityFields is now failing in 4.0:
var field = new SD.LLBLGen.Pro.ORMSupportClasses.EntityField("XXX", "A", typeof(int));
MemoryStream ms = new MemoryStream();
var s = new System.Runtime.Serialization.NetDataContractSerializer();
s.Serialize(ms, field);
ms.Seek(0, SeekOrigin.Begin);
(new StreamReader(ms)).ReadToEnd().Dump();
ms.Seek(0, SeekOrigin.Begin);
var field2 = (SD.LLBLGen.Pro.ORMSupportClasses.EntityField)s.Deserialize(ms); // Exception here
field2.Dump();
The Deserialize call fails with the following exception:
IXmlSerializable Type 'SD.LLBLGen.Pro.ORMSupportClasses.EntityField' must have default constructor.
My guess at the problem is that in 4.0, EntityFieldCore now implements IXmlSerializable, but EntityField does not implement a default construtor (EntityField2 does)