By default, MVC views are compiled at runtime. To force them to compile at build time, follow these steps:
- Edit project file in a text editor
- Change the line
<MvcBuildViews>false</MvcBuildViews> to <MvcBuildViews>true</MvcBuildViews> - Save the changes and allow Visual Studio (if executed) to reload the project file when prompted.
The building will take a little longer. However, on my (fast) system with an average project, I hardly notice the difference.
source share