The method 'Any' is not supported. even with Oct 2011 CTP? huh?

Yanıt The method 'Any' is not supported. even with Oct 2011 CTP? huh?

  • 12 Mart 2012 Pazartesi 02:39
     
     
    I'm getting the

    The method 'Any' is not supported.

    error, but I'm using the Oct 2011 CTP, is there some gotcha I'm missing?

    Thanks

Tüm Yanıtlar

  • 12 Mart 2012 Pazartesi 02:55
     
     
    After some juggling I get this

    The method 'Any' is not supported when MaxProtocolVersion is less than '3.0'

    even though my DataServiceProtocolVersion is set to V3, it seems whenever I update the service reference is adds a Data.Services.Client reference to the .NET 4.5 version and I have to remove and readd the CTP one.

  • 12 Mart 2012 Pazartesi 07:48
    Moderatör
     
     Yanıt

    For the V3 features to work on the client you need to make sure that you pass DataServiceProcolVersion.V3 as a parameter to the DataServiceContext constructor. Since it seems you're using the V2 code gen, that will not do it and you might need to modify the generated code to do so.

    Thanks,


    Vitek Karas [MSFT]

  • 14 Mart 2012 Çarşamba 20:07
     
     

    Thanks very much. Is there no V3 code gen yet? or I'm doing something wrong that makes it do V2 code gen? I assume thats why I don't have a DataServiceProtocolVersion parameter on my Context constructor?


  • 16 Mart 2012 Cuma 01:59
    Moderatör
     
     

    The CTP bits should do a V3 code gen, but the VS integration is somewhat tricky. You can run the datasvc util from the CTP directory, that should allow V3 stuff.

    Thanks,


    Vitek Karas [MSFT]