我正在尝试解决Razor渲染错误。我尝试过从头开始重新创建项目。可能导致这种情况的任何想法?
error CS1502: The best overloaded method match for 'ServiceStack.Razor.RenderingPage.WriteTo(System.IO.TextWriter, ServiceStack.MiniProfiler.HelperResult)' has some invalid arguments
堆栈跟踪
at ServiceStack.Razor.Compilation.RazorPageHost.Compile() at ServiceStack.Razor.Managers.RazorPageResolver.EnsureCompiled(RazorPage page, IHttpResponse response) at ServiceStack.Razor.Managers.RazorPageResolver.CreateRazorPageInstance(IHttpRequest httpReq, IHttpResponse httpRes, Object dto, RazorPage razorPage) at ServiceStack.Razor.Managers.RazorPageResolver.ResolveAndExecuteRazorPage(IHttpRequest httpReq, IHttpResponse httpRes, Object model, RazorPage razorPage) at ServiceStack.Razor.Managers.RazorPageResolver.ProcessRequest(IHttpRequest httpReq, IHttpResponse httpRes, Object dto) at ServiceStack.WebHost.Endpoints.Formats.HtmlFormat.c__DisplayClass1.b__0(IViewEngine x) at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate) at ServiceStack.WebHost.Endpoints.Formats.HtmlFormat.SerializeToStream(IRequestContext requestContext, Object response, IHttpResponse httpRes) at ServiceStack.Common.Web.HttpResponseFilter.SerializeToStream(IRequestContext requestContext, Object response, Stream responseStream) at ServiceStack.Common.Web.HttpResult.WriteTo(Stream responseStream) at ServiceStack.WebHost.Endpoints.Extensions.HttpResponseExtensions.WriteToOutputStream(IHttpResponse response, Object result, Byte[] bodyPrefix, Byte[] bodySuffix) at ServiceStack.WebHost.Endpoints.Extensions.HttpResponseExtensions.WriteToResponse(IHttpResponse response, Object result, ResponseSerializerDelegate defaultAction, IRequestContext serializerCtx, Byte[] bodyPrefix, Byte[] bodySuffix)
答案 0 :(得分:0)
我自己也得到了同样的错误,并且得出的结论是ServiceStack不能正确支持razor @helpers(至少那是我的错误来自哪里)。如果我能抽出一些时间,我会添加该功能。