You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Core uses Razor templating to generate emails and reports. Rest is a WebAPI only and references Core. Rest has the startup file, where RazorLight configuration takes place. Core contains the RazorViewRender, which in turns uses RazorLightEngine.
Using SetOperatingAssembly to an assembly of MyApp.Core (so resx files and other stuff are picked up correctly) results in a System.NullReferenceException
"Object reference not set to an instance of an object."
at RazorLight.Compilation.DefaultMetadataReferenceManager.Resolve(DependencyContext dependencyContext)
at RazorLight.Compilation.RoslynCompilationService.EnsureOptions()
at RazorLight.Compilation.RoslynCompilationService.get_ParseOptions()
at RazorLight.Compilation.RoslynCompilationService.CreateSyntaxTree(SourceText sourceText)
at RazorLight.Compilation.RoslynCompilationService.CreateCompilation(String compilationContent, String assemblyName)
at RazorLight.Compilation.RoslynCompilationService.CompileAndEmit(IGeneratedRazorTemplate razorTemplate)
at RazorLight.Compilation.RoslynCompilationService.CompileAsync(IGeneratedRazorTemplate razorTemplate)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at RazorLight.Compilation.TemplateFactoryProvider.<CompileAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at RazorLight.Compilation.TemplateFactoryProvider.<CreateFactoryAsync>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at RazorLight.RazorLightEngine.<CompileTemplateAsync>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at RazorLight.RazorLightEngine.<CompileRenderAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at SitkaWebApp.Server.Core.Services.Documents.RazorViewRenderer.<RenderAsync>d__2`1.MoveNext() in C:\Users\orobe\Documents\IT Services\Customers\000055 - SITKA\Web App\SitkaWebApp.Server.Core\Services\Documents\RazorViewRenderer.cs:line 13
The text was updated successfully, but these errors were encountered:
My solution consist of 2 projects:
Core uses Razor templating to generate emails and reports. Rest is a WebAPI only and references Core. Rest has the startup file, where RazorLight configuration takes place. Core contains the RazorViewRender, which in turns uses RazorLightEngine.
Using SetOperatingAssembly to an assembly of MyApp.Core (so resx files and other stuff are picked up correctly) results in a
System.NullReferenceException
Startup.cs:
RazorViewRender.cs:
Stack Trace:
The text was updated successfully, but these errors were encountered: