the problem is in the Serialize Method... I don't know the cause but the T type is see as a generic object.
So, the serialize Method of the xmlSerializer object don't know the type to serialize.
I solve the problem with this modified method
public static XElement Serialize(object instance, string nameSpace)
var serializer = new XmlSerializer(instance.GetType(), nameSpace);
using (var ms = new MemoryStream())
ms.Position = 0;
return XElement.Load(ms, LoadOptions.PreserveWhitespace);
I think my solution is not very good and I don't know the repercussions it may caused...
I think the probleme is present since the 4.1 version and the 4.0 version seem's to be ok.
For information, the sample application doesn't work on the 4.1 version in my environment but the unitTest are ok.
I don't know if it's related.
Thank you a lot for your project and sorry for my english!