Antaris / RazorEngine

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

cshtml file with model in console app #595

Open sybaris opened 1 year ago

sybaris commented 1 year ago

Hi

I am using RazorEngine in a console application 4.6.2 .Net framework. If I put my template in a cshtml file (I want to embed this file as ressource), I have the following error at build time : "The name 'Model' does not exist in the current context"

If I put my template in a string varibale (no cshtml file), I don't have the problem.

Regards Sybaris