Deserialising to IList

Having upgraded the website I work on to .net 2.0, one of our console apps failed whilst talking to a webservice on the site. We’d not changed anything on either the console app, or the website other than upgrading the website to 2.0.

The error message was “global:System.Collections.IList cannot be deserialized because it does not have a default public constructor”. This makes a lot of sense and it turns out that the class being serialised contains a public IList property. Changing this to a concrete type solved the problem.

So the question is… what was the deserialiser in 1.1 doing? how did it know which concrete type to deserialise to?

Advertisements

One thought on “Deserialising to IList

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s