We have a project and would like to build the views to generate compile time errors if there is anything wrong within the Views\' .cshtml files.
Still, compile time incr
Well I think having the possibility to compile the views is a good thing by itself but I cannot wait that long either.
So what I prefer to do is to add that MvcBuildViews = true
inside the ProperyGroup
of Release so that you only Compile the views at the Release time and before deployment
The property group should look like this:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
So put your
<MvcBuildViews>true</MvcBuildViews>
Inside this Release block. this way you still compile your views once and not every time you try to debug...