VS 2010 RC problem with missing ObservableCollection for WCF services

I'm back into Silverlight 3 now after a long break.  Since VS2010 RC was just released, I decided to upgrade my existing SL3 project and enjoy the benefits of a greatly improved IDE.  The project appeared to convert to just fine, but I had compile errors.  It seems my ObservableCollections were now arrays.  When attempting to update/configure a service reference, it chooses ( Custom ) and ObservableCollection is no longer a choice!

Somebody goofed at Microsoft and left out the ObservableCollection type.  To fix, you need to do this:

1.  Choose System.Collections.ObjectModel.Collection as the Collection type (instead of ( Custom )).

2.  Update, or configure your reference

3.  Find the reference.cs (or .vb) file (open windows explorer and find it in your Services References folder)

4.  Change all System.Collections.ObjectModel.Collection to System.Collections.ObjectModel.ObservableCollection.

 

Back in business.  I have no doubt they'll fix this by RTM, but that allows me to work with the RC and Silverlight/WCF.

I hope this helps somebody.  Happy programming.

 

Good tutorial for Silverlight with WCF and Linq To Sql

Part of Jeff Blankenburg's "31 Days of Silveright".  I went through this tutorial to get myself refreshed on Silveright.  It's been about 6 months since I've done a SL2 project and needed refreshing.

http://jeffblankenburg.com/2009/07/day-7-using-wcf-web-services-with.aspx

 

Silveright and WCF on Windows 7 issues

I've just found a solution to a problem I was having.  Using SL2 when adding a service reference to my WCF service, my project compiles fine, but does not run.  I get the error:

"Unrecognized element '' in service reference configuration. Note that only a subset of the Windows Communication Foundation configuration functionality is available in Silverlight."

It turns out this is only a problem on Windows 7 rc. In your client side service reference file, something like MyServiceReference.ClientConfig, you'll have:

The fix is to remove the <security> element above that is circled.  Apparently this is not valid and only happens on Windows 7 RC.