- Right-click on your project file in Visual Studio’s Solution Explorer and choose Unload Project.
- Right-click the project file again and choose Edit YourProject.csproj.
- Look for a node called <MvcBuildViews> in the first <PropertyGroup> node (the one without any other attributes). If it’s not there, add it.
- Add or update the value inside the <MvcBuildViews> node to true. When you’re done it should look like this:
- Save the project file changes.
- Right-click the project file in Solution Explorer one last time and select Reload Project.
Thursday, December 5, 2013
Get Compile-Time View Errors in ASP.NET MVC
ASP.NET MVC developers generally face an issue with compiling their views. The errors are not reported when compiling views and they eventually turn out to be "Yellow Screen Of Death" issues from client. Below are the steps to enable compilation errors in views: