【问题标题】:Azure Search .NET SDK throws InvalidOperationException SerializationBinder with Newtonsoft.Json version higher than 9.0.1Azure 搜索 .NET SDK 引发 InvalidOperationException SerializationBinder,Newtonsoft.Json 版本高于 9.0.1
【发布时间】:2018-09-14 07:06:49
【问题描述】:

在将 NewtonSoft.Json 更新到版本 10.0.3 后,我收到一条错误消息 System.MissingMethodException: Method not found: 'Newtonsoft.Json.SerializationBinder' from Azure .NET SDK

这是 StackTrace 的一部分

at Microsoft.Azure.Search.JsonUtility.CopySettings(JsonSerializerSettings baseSettings)
   at Microsoft.Azure.Search.JsonUtility.CreateDeserializerSettings[TSearchResult,TSuggestResult,TDoc](JsonSerializerSettings baseSettings)
   at Microsoft.Azure.Search.DocumentsOperations.DeserializeForSearch[T](String payload)
   at Microsoft.Azure.Search.DocumentsOperations.<DoContinueSearchWithHttpMessagesAsync>d__21`3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Azure.Search.DocumentsOperationsExtensions.<SearchAsync>d__17`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()

我正在使用最新版本的 Microsoft.Azure.Search 和 .Net Core

【问题讨论】:

    标签: azure azure-cognitive-search


    【解决方案1】:

    这是known issue。请确保您使用的是 Microsoft.Azure.Search 5.0.0 版(或可用的更新版本)。

    【讨论】:

    • 感谢您的回答。我正在使用 Microsoft.Azure.Search vesion 3.0.5 但问题仍然存在,所以我试图通过绑定重定向来解决这个问题
    • 我们刚刚发布了 5.0.0。请试一试,如果有帮助,请告诉我们。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-10-16
    • 1970-01-01
    • 2019-02-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-09-24
    相关资源
    最近更新 更多