【问题标题】:Method not found: 'System.String RazorEngine.Templating.ITemplate.Run找不到方法:'System.String RazorEngine.Templating.ITemplate.Run
【发布时间】:2015-08-05 20:53:09
【问题描述】:

我正在尝试新的 Azure 移动应用。在 Azure 中创建实例,然后下载 Visual Studio 包。通过 Nuget 更新了所有组件。现在当我运行它时,出现以下错误:

<Error><Message>An error has occurred.</Message><ExceptionMessage>Method not found: 'System.String RazorEngine.Templating.ITemplate.Run(RazorEngine.Templating.ExecuteContext)'.</ExceptionMessage><ExceptionType>System.MissingMethodException</ExceptionType><StackTrace>   at Microsoft.Azure.Mobile.Server.Content.HtmlActionResult.ExecuteAsync(CancellationToken cancellationToken)
at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.AuthenticationFilterResult.<ExecuteAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()</StackTrace></Error>

找到另一篇建议升级 Windows Azure 移动服务的帖子,我已经这样做了。

正在运行 Razor Engine 3.7.0

【问题讨论】:

    标签: c# azure azure-mobile-services razorengine


    【解决方案1】:

    这似乎是 RazorEngine v 3.5 及更高版本的问题。使用 3.4.2 工作正常。

    https://github.com/Antaris/RazorEngine/issues/284

    【讨论】:

      猜你喜欢
      • 2015-08-14
      • 2018-12-14
      • 2021-06-17
      • 2021-12-27
      • 2021-09-12
      • 2018-01-14
      • 1970-01-01
      • 1970-01-01
      • 2019-03-11
      相关资源
      最近更新 更多