ObservableCollection no longer returns for collections

I am having a big problem with my Silverlight application. The generated proxy for my WCF service no longer generates ObservableCollections for collection types when I update the service link. Instead, it generates arrays.

I have already verified that the Collection Type is set to ObservableCollection in Configure Service Link.

I tried on two different machines and in VS2010 and VS2012, and I created new vs projects and added new service links. But the result is always the same.

I tried switching to silverlight 5 instead of 4 - but no luck.

I am really stuck with this. I see in our TFS journal that the link has not been changed since November 2013, and at that time it generated ObservableCollecions.

I don't know if Visual Studio, .NET or anything else was being updated - what could cause this problem?

Any help would be greatly appreciated!

Thanks!

/ Mikkel

+4
source share
1 answer

The problem is solved!

A new property with a DataTable in the model caused a problem. The DataTable type caused the use of XmlSeralizer instead of DataContractSerializer.

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

Now everything works again .....

+2
source

Source: https://habr.com/ru/post/1526194/


All Articles