locked
3.5 SP1 update release with Silverlight 3 Update CTP3 problems... RRS feed

  • Question

  • Ok... so here is the situation... all from fresh installs.

    • VS2010 RC (Ultimate)
    • ADO.NET Data Services for Silverlight 3 Update CTP3
    • ADO.NET Data Services Update for .NET Framework 3.5 SP1 for Windows 7 and Windows Server 2008 R2
    • A SL3 / 3.5 project that was working perfectly with the CTP2 release
    The problem...

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

    Of course I have a reference to System.Data.Services.Client.dll in the project, but thats the problem. The SL3 CTP3 docs tell us to install it side by side with the SDK versions and reference it from the new location. However, when I add a reference from the new location as it wants, it replaces the path and loads the one from "C:\Program Files (x86)\Microsoft SDKs\Silverlight\v3.0\Libraries\Client" anyway.

    Anyone got this working? Am I missing something here?

    Thanks!

    Ken



    Thursday, March 18, 2010 9:09 AM

Answers

All replies

  • Someone asked me to drop an error here so I will, not I edited the on disk path cause it is long and ugly.

    "Error 11 The type or namespace name 'DataServiceCollection' does not exist in the namespace 'System.Data.Services.Client' (are you missing an assembly reference?) (big long path name here)\ProjectName\Service References\DashboardDataService.cs 991 53 TheCms.Dashboard.Silverlight"

    There are 46 similar errors, the line triggering one of them is shown here...

    "private global::System.Data.Services.Client.DataServiceCollection<CmsEventProfileLink> _CmsEventProfileLinks = System.Data.Services.Client.DataServiceCollection.Create<CmsEventProfileLink>();"

    Ken
    Thursday, March 18, 2010 11:32 AM
  • Ok, adding the desired SL3 CPT3 folder to the "reference paths" for the project helped with the dynamic path resetting stuff VS2010 was doing. So thats great.

    It looks like the line above is now wrong due to changes in the DataServiceCollection class.

    "private global::System.Data.Services.Client.DataServiceCollection<CmsEventProfileLink> _CmsEventProfileLinks = System.Data.Services.Client.DataServiceCollection.Create<CmsEventProfileLink>();"

    Should now be...

    ""private global::System.Data.Services.Client.DataServiceCollection<CmsEventProfileLink> _CmsEventProfileLinks = new System.Data.Services.Client.DataServiceCollection<CmsEventProfileLink>();"

    I am still tracking down what is the new syntax for the actual data retrieval, which in CTP2 looked like this...

    Dispatcher.BeginInvoke(
                                () =>
                                {
                                    DataServiceQuery<CmsEventProfileLink> query = asyncResult.AsyncState as DataServiceQuery<CmsEventProfileLink>;
                                    if (query != null)
                                    {
                                        //create a tracked DataServiceCollection from the result of the asynchronous query.
                                        links = DataServiceCollection.CreateTracked<CmsEventProfileLink>(dashboardService, query.EndExecute(asyncResult));

                                        AsyncLoadTracker();
                                    }
                                }
                            );

    But of course that fails now with..

    Error 2 Using the generic type 'System.Data.Services.Client.DataServiceCollection<T>' requires 1 type arguments (big long path name here)\ProjectName\Views\EventOverview.xaml.cs 125 45 Cms.Dashboard.Silverlight



    Ken
    Thursday, March 18, 2010 11:48 AM
  • Hi Soulhuntre,
     The DataServiceCollection type declared in the Silverlight client library from CTP3 doesn't have static factory methods anymore.
     Can you clean the solution and check if you are referencing the client library from CTP2 in your application?
    Phani Raj Astoria http://blogs.msdn.com/PhaniRaj
    Thursday, March 18, 2010 2:52 PM
    Moderator
  • Hi Soulhuntre,
     The DataServiceCollection type declared in the Silverlight client library from CTP3 doesn't have static factory methods anymore.
     Can you clean the solution and check if you are referencing the client library from CTP2 in your application?
    Phani Raj Astoria http://blogs.msdn.com/PhaniRaj
    Hey Raj!

    I am hitting the CTP3 - can you point me at any documentation of what the new syntax to use where "CreateTracked<>" used to be appropriate?

    Ken
    Thursday, March 18, 2010 10:58 PM
  • Hi Soulhuntre,

    You can use new constructors. Here is link http://msdn.microsoft.com/en-us/library/ee652640(VS.100).aspx

     

     


    [MSFT] Sih Huseyin Ulger
    • Marked as answer by Mike Flasko 2 Tuesday, March 30, 2010 4:01 PM
    Friday, March 19, 2010 2:18 PM
  • Are you sure you need this updates?

    ADO.NET Data Services Update for .NET Framework 3.5 SP1 for Windows 7 and Windows Server 2008 R2 updates ADO.NET DS from v.1 to v1.5. As I think, VS2010 has last WCF DataServices version by default...

    Friday, March 19, 2010 2:29 PM
  • Hi Soulhuntre,

    You can use new constructors. Here is link http://msdn.microsoft.com/en-us/library/ee652640(VS.100).aspx

     

     


    [MSFT] Sih Huseyin Ulger

    Thanks! I will look into them and see if I can figure it out :)

     

    Ken

     

    Saturday, March 20, 2010 8:11 AM
  • Are you sure you need this updates?

    ADO.NET Data Services Update for .NET Framework 3.5 SP1 for Windows 7 and Windows Server 2008 R2 updates ADO.NET DS from v.1 to v1.5. As I think, VS2010 has last WCF DataServices version by default...

    Yeah, I needed the Silverlight CTP3 add-ins so that silverlight can continue to work with the VS2010 RC WCF stuff.

     

    Ken

    Saturday, March 20, 2010 8:12 AM