Closed hussein-khamis closed 3 years ago
Hi, can you please post console app example to reproduce this exception?
system.collections is referenced by default so there is something else.
@hussein-khamis did you succeed?
Hello, yes I was able to by adding the assembly reference "System.Collections". Sorry for the late response but thank you!
In case anyone has this issue, adding the reference this way worked for me:
builder.AddAssemblyReference(Assembly.Load("System.Collections"));
Hello, worked fine with normal models, but with this XYZ model, it is not working and showing me the following error: RazorEngineCore.RazorEngineCompilationException HResult=0x80131500 Source=RazorEngineCore StackTrace: at RazorEngineCore.RazorEngine.CreateAndCompileToStream(String templateSource, RazorEngineCompilationOptions options) at RazorEngineCore.RazorEngine.Compile[T](String content, Action`1 builderAction) at RazorEngineHelper.GenerateTemplate(XYZ Model, String templateName) in C:...\RazorEngineHelper.cs:line 27
Thank you.