XmlSerialization of shadowed properties, behavior change from .NET 4.0 to .NET 4.5 - by Erv Walter (Epic)

Status : 

  Duplicate<br /><br />
		This item appears to be a duplicate of another existing Connect or internal item.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 777892 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 1/30/2013 6:45:22 AM
Access Restriction Public


In .NET 4.0, shadowed properties were serialized using the derived type's implementation of the property.  In .NET 4.5, the serializer is using the base class' implementation of the property.

See details below for sample code to reproduce this.
Sign in to post a comment.
Posted by Microsoft on 2/27/2013 at 2:34 PM
This issue is already being tracked through this connect issue: http://connect.microsoft.com/VisualStudio/feedback/details/761786/net-4-5-xmlserializer-produces-different-output-from-4-0. We are currently working on a fix for this.
Posted by Microsoft on 1/30/2013 at 9:20 PM
Thank you for submitting feedback on Visual Studio and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by Erv Walter (Epic) on 1/30/2013 at 2:28 PM
My report appears to be a duplicate of this bug report:


I don't see a way to close this myself, though. I will add the workaround from the other bug to this one in case someone stumbles on this report and wants to see the workaround.
Posted by Microsoft on 1/30/2013 at 6:50 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)