I believe I read somewhere there is a setting in one of the project files that will allow you to compile the .cshtml files when building your Visual Studio proj
.cshtml
Set true in the element of your .csproj file.
true