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

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

  • 12 Maret 2012 2: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

Semua Balasan

  • 12 Maret 2012 2: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 Maret 2012 7:48
    Moderator
     
     Jawab

    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 Maret 2012 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 Maret 2012 1:59
    Moderator
     
     

    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]