Quantcast
Channel: RazorGenerator Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 525

Edited Unassigned: Fails to generate views when name starts with a number [159]

$
0
0
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;

}

}
```

Viewing all articles
Browse latest Browse all 525

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>