How to compile cshtml before runtime

Set <MvcBuildViews>true</MvcBuildViews> in the <PropertyGroup> element of your .csproj file.

Leave a Comment