Building SL3 applications using OData client Library with Vs 2010 RC

So , here you are trying to build an awesome OData client application in SL3 using the V.S 2010 RC’s just as amazing Multi-targeting support for Silverlight applications.
You’ve downloaded the SL3 CTP3 assembly from here and unzipped the System.Data.Services.Client.dll file to a local folder c:\temp\SL3_CTP3_OData_Client ( your folder may vary ).

Using a V2 feature in the client library , after adding a reference to the client library from the local folder , results in a compilation error.


Error : The type or namespace name 'DataServiceCollection' could not be found (are you missing a using directive or an assembly reference?)

But , I added the reference manually and pointed it to the right Client library which should have these types declared in it .

Well, it turns out that Visual Studio 2010 RC uses the client library from the SL3 SDK library anyway , even if you specified the path manually.

To fix this , add the folder which contains the SL3 CTP3 client library to the “Reference Paths” of the application , as shown here :

1. Right click the project in Visual Studio and select “Properties”

2. Click the “Reference Paths” tab in the property tabs.

3. Add the folder containing the SL3 CTP3 client library as shown below.


Once you add the reference path to the folder containing the SL3 CTP3 library , you should stop seeing the compilation failures ,
and you should be able to access the SL3 CTP3 features such as the DataServiceCollection type and the LoadAsync methods

Special thanks to Shyam who first ran into this and helped figure out how to fix this .