-
Notifications
You must be signed in to change notification settings - Fork 587
Closed
Labels
Description
Hi folks,
I'm getting an error during RunCompilemethod.
For a reason that I don't know the lasted version or RazorEngine is trying to serialize a class used into my project. That class is not serializable for tha reason the app crashes.
The weird part is that the previous version of RazorEngine was working, so probably is something related to the new version.
Here the error message:
Type 'Owin.OwinRequestScopeContext' in assembly 'OwinRequestScopeContext, Version=1.0.1.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable.
and here the stack
at System.AppDomain.InternalCreateInstanceFromWithNoSecurity(String assemblyName, String typeName) at RazorEngine.Compilation.CrossAppDomainCleanUp..ctor(AppDomain toWatch, IPrinter printer) at RazorEngine.Compilation.CrossAppDomainCleanUp.CreateInitial() at System.Lazy`1.CreateValue() --- End of stack trace from previous location where exception was thrown --- at System.Lazy`1.get_Value() at RazorEngine.Compilation.CrossAppDomainCleanUp.RegisterCleanup(String item, Boolean throwOnDefault) at RazorEngine.Templating.DefaultCachingProvider.CacheTemplate(ICompiledTemplate template, ITemplateKey templateKey) at RazorEngine.Templating.RazorEngineService.CompileAndCacheInternal(ITemplateKey key, Type modelType) at RazorEngine.Templating.RazorEngineService.GetCompiledTemplate(ITemplateKey key, Type modelType, Boolean compileOnCacheMiss) at RazorEngine.Templating.RazorEngineService.GetTemplate(ITemplateKey key, Type modelType, Object model, DynamicViewBag viewbag) at RazorEngine.Templating.TemplateService.GetTemplate(String razorTemplate, Object model, String cacheName) at RazorEngine.Templating.TemplateService.Parse(String razorTemplate, Object model, DynamicViewBag viewBag, String cacheName) at RazorEngine.Razor.Parse[T](String razorTemplate, T model, String cacheName) at
Any hint?