Antaris / RazorEngine

Open source templating engine based on Microsoft's Razor parsing engine
http://antaris.github.io/RazorEngine
Other
2.14k stars 577 forks source link

RazorEngine.NetCore 2.2.2 throw exception RazorEngine.Templating.TemplateCompilationException On Mac Platform #560

Open namilkimfree opened 4 years ago

namilkimfree commented 4 years ago

It's success on window machine , but Throw exception on mac machine.

how to resolve..

TearDown : RazorEngine.Templating.TemplateCompilationException : Errors while compiling a Template. Please try the following to solve the situation:

If the problem is about missing/invalid references or multiple defines either try to load the missing references manually (in the compiling appdomain!) or Specify your references manually by providing your own IReferenceResolver implementation. See https://antaris.github.io/RazorEngine/ReferenceResolver.html for details. Currently all references have to be available as files! If you get 'class' does not contain a definition for 'member': try another modelType (for example 'null' to make the model dynamic). NOTE: You CANNOT use typeof(dynamic) to make the model dynamic! Or try to use static instead of anonymous/dynamic types. More details about the error: