This project has moved and is read-only. For the latest updates, please go here.

There was an error reflecting property 'Urls'

Topics: Developer Forum
May 11, 2010 at 5:42 PM

I get an exception thrown with this line of code having upgraded to the latest code:

this.serializer = new XmlSerializer(typeof(PhotoInfo));

with inner exception "There was an error reflecting property 'Urls'". With the new representations in PhotoInfo how should we be serializing instances to disk? 

May 12, 2010 at 10:40 AM

Well, I made these changes to fall in line with the Code Analysis results which indicate that if a property is a Url you should use the Uri type, rather than a string, but given the fact this seems to be the only thing stopping Xml serialization I think I'm going to change it back again.

Other than that, the only suggestion is to use the BinaryFormatter instead perhaps.