Question

I've just ran into a big problem with my Silverlight application - the generated proxy for my WCF service does no longer generate ObservableCollections for collection-types when i update the service reference. Instead it is generating Arrays.

I have already checked that the "Collection type" is set to ObservableCollection in "Configure Service Reference".

I have tried on two different machines and both in VS2010 and VS2012 - and I've created new vs-projects and added new Service references. But the result is always the same.

I have tried to change to silverlight 5 instead of 4 - but with no luck.

I'm really stucked at this one. I can see in our TFS log, that the reference hasn't been changed since nov-2013 - and at that time it was generating ObservableCollecions.

I don't know if Visual Studio, .NET or something else has been updated since - which might cause this issue?

Any help will be highly appreciated!

Thanks!

/Mikkel

Was it helpful?

Solution

Problem solved!

A new property with a DataTable in the model was causing the problem. The DataTable type was causing the XmlSeralizer to be used instead of the DataContractSerializer.

And because the DataTable is not supported by Silverlight we removed the property.

Now everything works again.....

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top