Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/336.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 从Azure SDK 2.5升级到Azure SDK2.8.1_C#_Exception_Upgrade_Azure Sdk .net - Fatal编程技术网

C# 从Azure SDK 2.5升级到Azure SDK2.8.1

C# 从Azure SDK 2.5升级到Azure SDK2.8.1,c#,exception,upgrade,azure-sdk-.net,C#,Exception,Upgrade,Azure Sdk .net,我在运行时收到一个异常, 我该怎么做才能修好它 我把所有东西都升级到了最新版本 var query = q as System.Data.Services.Client.DataServiceQuery<T>; if (continuationToken != null) { query = query.AddQueryOption("NextPartit

我在运行时收到一个异常, 我该怎么做才能修好它

我把所有东西都升级到了最新版本

 var query = q as System.Data.Services.Client.DataServiceQuery<T>;
                    if (continuationToken != null)
                    {
                        query = query.AddQueryOption("NextPartitionKey", continuationToken.PartitionKey);
                        if (continuationToken.RowKey != null)
                        {
                            query = query.AddQueryOption("NextRowKey", continuationToken.RowKey);
                        }
                    }
                    // i fall here with the concrete exception I mentioned above
                    var response = (System.Data.Services.Client.QueryOperationResponse<T>) query.Execute();
                    result = result.Union(response.ToList<T>());


Exception thrown: 'System.InvalidCastException' in Microsoft.Data.Services.Client.dll

Additional information: Unable to cast object of type 'System.Data.Services.Client.Providers.EdmEntityTypeWithDelayLoadedProperties' to type 'Microsoft.Data.Edm.IEdmComplexType'.
   at System.Data.Services.Client.ClientEdmModel.GetOrCreateEdmTypeInternal(IEdmStructuredType edmBaseType, Type type, PropertyInfo[] keyProperties, Boolean isEntity, Nullable`1 hasProperties)
   at System.Data.Services.Client.ClientEdmModel.GetOrCreateEdmTypeInternal(Type type)
   at System.Data.Services.Client.ClientEdmModel.GetOrCreateEdmType(Type type)
   at System.Data.Services.Client.TypeResolver.ResolveExpectedTypeForReading(Type clientClrType)
   at System.Data.Services.Client.Materialization.ODataMaterializer.CreateMaterializerForMessage(IODataResponseMessage responseMessage, ResponseInfo responseInfo, Type materializerType, QueryComponents queryComponents, ProjectionPlan plan, ODataPayloadKind payloadKind)
   at System.Data.Services.Client.MaterializeAtom..ctor(ResponseInfo responseInfo, QueryComponents queryComponents, ProjectionPlan plan, IODataResponseMessage responseMessage, ODataPayloadKind payloadKind)
   at System.Data.Services.Client.QueryResult.CreateMaterializer(ProjectionPlan plan, ODataPayloadKind payloadKind)
   at System.Data.Services.Client.QueryResult.ProcessResult[TElement](ProjectionPlan plan)
   at System.Data.Services.Client.DataServiceRequest.Execute[TElement](DataServiceContext context, QueryComponents queryComponents)
   at xxx.Data.TableService`1.Select(IQueryable`1 q, Boolean useCache, String cacheKey) in C:\dev\xxx\Development\Platform\xxx.Data\Tables\TableService.cs:line 194