-
Notifications
You must be signed in to change notification settings - Fork 32
Description
I saw this exception today in my logs in live environment, We are using this to parse contents for email body. And it threw this randomly after processing some 3/4000 emails.
Xipton.Razor.Core.TemplateCompileException: error CS1647: An expression is too long or complex to compile
at Xipton.Razor.Core.TemplateFactory.CheckCompileResults(GeneratorResults generatorResults, CompilerResults compilerResults, String templateContent, String generatedSource)
at Xipton.Razor.Core.TemplateFactory.CreateAssembly(String resourceName, String rootNamespace, String className, String content, String& generatedSource)
at Xipton.Razor.Core.TemplateFactory.CreateBucket(String reqestedPath)
at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory)
at Xipton.Razor.Core.TemplateFactory.CreateTemplateInstance(String requestedVirtualTemplateName, Boolean throwExceptionOnVirtualPathNotFound)
at Xipton.Razor.TemplateBase.Xipton.Razor.Core.ITemplateController.TryApplyLayout()
at Xipton.Razor.RazorMachine.ExecuteUrl(String templateVirtualPath, Object model, Object viewbag, Boolean skipLayout, Boolean throwExceptionOnVirtualPathNotFound)
at Xipton.Razor.RazorMachine.ExecuteContent(String templateContent, Object model, Object viewbag, Boolean skipLayout)
I tried parsing the same email locally(same model, same template) and it worked.
this is the version that we are using - Xipton.Razor.dll, v4.0.30319