When the Razor Host configuration doesn't have the necessary configuration to generate C# code for an @helper directive, it should throw out a specific error indicating that @helper is not supported (possibly with information for the developer on how to support it).
As a specific example, if you try to use @helper in a Host which does not have GeneratedClassContext.WriteToMethodName set, it will render out invalid C# that will cause obscure compiler errors. Instead, we should report a clearer error like "@helper is not supported because this host does not define the WriteTo method"
This is a low-pri fix, there is no actual bug in the code, it's more something that could be reported to the user better.
As a specific example, if you try to use @helper in a Host which does not have GeneratedClassContext.WriteToMethodName set, it will render out invalid C# that will cause obscure compiler errors. Instead, we should report a clearer error like "@helper is not supported because this host does not define the WriteTo method"
This is a low-pri fix, there is no actual bug in the code, it's more something that could be reported to the user better.