... because in RazorEngine.CreateHost the Razor creates default System.Web.Razor.Generator.GeneratedClassContext instance iwith only 3 arguments out of 6.
adding lines
var nonDefault = new System.Web.Razor.Generator.GeneratedClassContext("Execute",
"Write",
"WriteLiteral",
"WriteTo",
"WriteLiteralTo",
"NestedHelper");
host.GeneratedClassContext = nonDefault;
to Core\RazorEngine.cs at line 532 allows to create custom templates that support helpers.
... because in RazorEngine.CreateHost the Razor creates default System.Web.Razor.Generator.GeneratedClassContext instance iwith only 3 arguments out of 6. adding lines var nonDefault = new System.Web.Razor.Generator.GeneratedClassContext("Execute", "Write", "WriteLiteral", "WriteTo", "WriteLiteralTo", "NestedHelper"); host.GeneratedClassContext = nonDefault;
to Core\RazorEngine.cs at line 532 allows to create custom templates that support helpers.