Jasinski Technical Wiki

Navigation

Home Page
Index
All Pages

Quick Search
»
Advanced Search »

Contributor Links

Create a new Page
Administration
File Management
Login/Logout
Your Profile

Other Wiki Sections

Software

PoweredBy

Page History: Compile-Time Checking of ASP.NET Views

Compare Page Revisions



« Older Revision - Back to Page History - Current Revision


Page Revision: Tue, Jul 05, 2016, 11:26 AM


Overview

If you've ever refactored a view model for an ASP.NET site, you're aware that doing so can break the view(s) that the view model is based upon. Furthermore, you won't discover this until the view is invoked at run-time. This article describes how to avoid this by forcing the views to be build at compile-time, thus revealing any issues.

Credits


Procedure

1. Unload Web project

2. Edit Web Project

3. Add the MvcBuildViews line

  <PropertyGroup>

    . . . 

    <MvcBuildViews>true</MvcBuildViews>

    . . . 

</PropertyGroup>

ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.