Skip to main content

Change ASP.NET Core Razor Pages default directory name

One of the new key feature of ASP.NET Core 2.0 is Razor Pages. Razor Pages are simple pages or views without controllers and introduced with the intent of creating page focused scenarios where there is no real logic is involved. You will find razor pages similar to ASP.NET Web Forms. They work on the convention and need to be placed in Pages folder and the extension is .cshtml. If you already have a folder named “Pages” in your solution, then it will create problems. Ideally, you would like to have a different name for the Razor page directory to avoid any issues. This post shows how to change ASP.NET Core Razor Pages default directory name.
Read More