in

Dé specialist in .NET trainingen en consultancy

Erik van Appeldoorn

januari 2012 - Posts

  • Precompile ASP.NET MVC views

    Views in an ASP.NET MVC project will not be compiled by default. Syntax errors made in views will only show up as runtime errors in the browser.

    There is a small hack to include the views in your compile process:

    • Unload your project file (.csproj or .vbproj)
    • Edit this file and look for the line: <MvcBuildViews>false</MvcBuildViews>
    • Change false to … true, indeed you know what you are doing.
    • Save the projectfile and you are good to go.