Posts

Showing posts from July, 2013

Ease your web development - compile your Razor views!

Image
Don't you just love when - as you add or modify the service layer and models of your web code - everything just works? That is, until you hit that (partial) view that you were not expecting to be affected by your change and ... BOOM! It is extra amounts of fun, when this page is at the end of a page flow, having required that you enter a lot of data before hitting the brick wall. I found it tremendously helpful to enable Build Views  in my solutions for this reason. By enabling this single feature, whenever you build your web project, your views get built too, ensuring that silly things like typos doesn't cramp your style: To enable the feature, simply right-click your web project and unload it. Then, right-click it again and choose to edit it. Locate the tag MvcBuildViews and change it to serenity: <mvcbuildviews> true </mvcbuildviews> After this single change, save your project file, right click on it in Solution Explorer and choose to reload