未找到方法:'System.Object Newtonsoft.Json.Linq.JToken.ToObject(System.Type)'



我们的 mvc 项目 json.net 运行在每个开发人员上都没有任何问题,除了带有新 Windows 8.1 系统的开发人员。我们如何找到方法未找到问题的来源?

例外详情 ;

[MissingMethodException: Method not found: 'System.Object Newtonsoft.Json.Linq.JToken.ToObject(System.Type)'.]
  ExtensionMethods.Eval(Object o, String propertyName) in c:UsersmaxSEPHIROTHDocumentsVisual Studio 2012ProjectsLogiSysMvcLogiSysMvcClassLibraryExtensionMethods.cs:136
  ASP.<>c__DisplayClass20.<Execute>b__1(CallbackPanelSettings settings) in c:UsersmaxSEPHIROTHDocumentsVisual Studio 2012ProjectsLogiSysMvcLogiSysMvcLogiSysMvcViewsGenel_PersonelGridViewEditFormPartial.cshtml:430
  DevExpress.Web.Mvc.UI.ExtensionsFactory.CreateExtension(Action`1 method) +137
  DevExpress.Web.Mvc.UI.ExtensionsFactory.CallbackPanel(Action`1 method) +43
  ASP._Page_Views_Genel_Personel_GridViewEditFormPartial_cshtml.Execute() in c:UsersmaxSEPHIROTHDocumentsVisual Studio 2012ProjectsLogiSysMvcLogiSysMvcLogiSysMvcViewsGenel_PersonelGridViewEditFormPartial.cshtml:11
  System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +271
  System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +121
  System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +191
  System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +762
  System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +382
  System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +431
  System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +39
  System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +74
  System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +388
  System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +72
  System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +303
  System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +155
  System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +184
  System.Web.Mvc.Async.WrappedAsyncResult`1.End() +136
  System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +56
  System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +66
  System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +40
  System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +47
  System.Web.Mvc.Async.WrappedAsyncResult`1.End() +151
  System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +59
  System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +40
  System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +68
  System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +47
  System.Web.Mvc.Async.WrappedAsyncResult`1.End() +151
  System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +59
  System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +40
  System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +65
  System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +39
  System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +45
  System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +47
  System.Web.Mvc.Async.WrappedAsyncResult`1.End() +151
  System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +59
  System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +40
  System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +66
  System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +38
  System.Web.Mvc.<>c__DisplayClassa.<EndProcessRequest>b__9() +44
  System.Web.Mvc.<>c__DisplayClass4.<Wrap>b__3() +34
  System.Web.Mvc.ServerExecuteHttpHandlerWrapper.Wrap(Func`1 func) +69
  System.Web.Mvc.ServerExecuteHttpHandlerWrapper.Wrap(Action action) +123
  System.Web.Mvc.ServerExecuteHttpHandlerAsyncWrapper.EndProcessRequest(IAsyncResult result) +133
  System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride) +1097

您应该检查该计算机上的 Newtonsoft.Json 库版本(也在 GAC 中)。去年11月引入的非通用ToObject方法,因此这可能会导致问题的可能性很小。

相关内容

  • 没有找到相关文章

最新更新