-
Notifications
You must be signed in to change notification settings - Fork 95
Closed
Description
I'm trying to use this lib to generate HTML on an Azure Function, not sure what could be going wrong here.
public static string RenderViewToString(RedactedViewModel model)
{
const string templateName = "redacted";
string viewPath = Path.Combine(Constants.VIEW_FOLDER_PATH, templateName + ".cshtml");
return new RazorEngine()
.Compile(File.ReadAllText(viewPath))
.Run(model);
}
System.IO.FileNotFoundException
HResult=0x80070002
Message=Could not load file or assembly 'Microsoft.CodeAnalysis, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
Source=RazorEngineCore
StackTrace:
at RazorEngineCore.RazorEngineCompilationOptions..ctor()
at RazorEngineCore.RazorEngineCompilationOptionsBuilder..ctor(RazorEngineCompilationOptions options)
Metadata
Metadata
Assignees
Labels
No labels