When we have a view starting with a number ex "123abc.cshtml" Razorgenerator.MsBUild creates the classes but they are not compilable :
"Error 134 Type or namespace definition, or end-of-file expected "
Because the class name is
"public partial class 8ColLargeImg"
It seems that microsoft fixed this because if I go to windows/microsoft.net/.../temporaty asp.net files and look for the generated assembly, i got
" public class _Page_Views_Shared_CodeBlock__8ColLargeImg_cshtml :"
I think you should add the following transformer
public class AvoidNUmberStartingClass : RazorCodeTransformerBase
{
public override void Initialize(RazorHost razorHost, IDictionary<string, string> directives)
{
razorHost.DefaultClassName = "_" + razorHost.DefaultClassName;
}
}
"Error 134 Type or namespace definition, or end-of-file expected "
Because the class name is
"public partial class 8ColLargeImg"
It seems that microsoft fixed this because if I go to windows/microsoft.net/.../temporaty asp.net files and look for the generated assembly, i got
" public class _Page_Views_Shared_CodeBlock__8ColLargeImg_cshtml :"
I think you should add the following transformer
public class AvoidNUmberStartingClass : RazorCodeTransformerBase
{
public override void Initialize(RazorHost razorHost, IDictionary<string, string> directives)
{
razorHost.DefaultClassName = "_" + razorHost.DefaultClassName;
}
}