Monday, 24 December 2018

How to enable compile time error checking for views.

1. Open MVC project file using notepad. Project files have the extension of .csproj or .vbproj
2. Search for MvcBuildViews under PropertyGroupMvcBuildViews is false by default. Turn this to true as shown below.
<MvcBuildViews>true</MvcBuildViews>
3. Save the changes.

If you now build the project, you should get compile time error.

No comments:

Post a Comment