RazorEngine.Templating.TemplateCompilationException

926 views Asked by At

whenever I use RazorEngine in my application I get the following error:

{"FailedAt":"2014-11-12T02:51:59.9765953Z","ExceptionType":"RazorEngine.Templating.TemplateCompilationException","ExceptionMessage":"Unable to compile template. Assuming assembly reference 'System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' matches 'System.Web.Mvc, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35', you may need to supply runtime policy\n\nOther compilation errors may have occurred. Check the Errors property for more information.","ExceptionDetails":"RazorEngine.Templating.TemplateCompilationException: Unable to compile template. Assuming assembly reference 'System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' matches 'System.Web.Mvc, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35', you may need to supply runtime policy\n\nOther compilation errors may have occurred. Check the Errors property for more information.\r\n at RazorEngine.Compilation.DirectCompilerServiceBase.CompileType(TypeContext context) in c:\Users\abbottm\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Compilation\DirectCompilerServiceBase.cs:line 106\r\n at RazorEngine.Templating.TemplateService.CreateTemplateType(String razorTemplate, Type modelType) in c:\Users\abbottm\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Templating\TemplateService.cs:line 256\r\n at RazorEngine.Templating.TemplateService.GetTemplate[T](String razorTemplate, Object model, String cacheName) in c:\Users\abbottm\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Templating\TemplateService.cs:line 374\r\n at RazorEngine.Templating.TemplateService.GetTemplate(String razorTemplate, Object model, String cacheName) in c:\Users\abbottm\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Templating\TemplateService.cs:line 352\r\n at RazorEngine.Templating.TemplateService.Parse(String razorTemplate, Object model, DynamicViewBag viewBag, String cacheName) in c:\Users\abbottm\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Templating\TemplateService.cs:line 437\r\n at RazorEngine.Razor.Parse(String razorTemplate, Object model, String cacheName) in c:\Users\abbottm\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Razor.cs:line 302\r\n at Postal.FileSystemRazorView.Render(ViewContext viewContext, TextWriter writer)\r\n at Postal.EmailViewRenderer.RenderView(IView view, ViewDataDictionary viewData, ControllerContext controllerContext, ImageEmbedder imageEmbedder)\r\n at Postal.EmailViewRenderer.Render(Email email, String viewName)\r\n at Postal.EmailService.CreateMailMessage(Email email)\r\n at NumediaTechCore.UI.Controllers.Admin.EmailsController.SendEmail(Int32 EmailTemplateID) in c:\NumediaTech\NumediaTechPortal\NumediaTechCore\UI\Controllers\Admin\EmailsController.cs:line 105"}

0

There are 0 answers