This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
Razor Page doesn't compile when dash/hyphen used in file name #6296
Closed
Description
If you use a dash / hyphen in a Razor Page file name, the resulting page will not compile. This is because the generated type name includes invalid characters e.g hyphen-test.cshtml becomes.
public class hyphen-test_Page : global::Microsoft.AspNetCore.Mvc.RazorPages.Page
You probably want to replace them with underscores.