<target condition="'$(MvcBuildViews)'=='true'" name="AfterBuild">
<aspnetcompiler physicalpath="$(ProjectDir)\..\$(ProjectName)" virtualpath="temp"></aspnetcompiler>
</target>
<propertygroup>
<mvcbuildviews>true</mvcbuildviews>
</propertygroup>
This has been an option since 2010, not many know about it.
http://blogs.msdn.com/b/jimlamb/archive/2010/04/20/turn-on-compile-time-view-checking-for-asp-net-mvc-projects-in-tfs-build-2010.aspx
1 comment:
I personally prefer the MS RazorGenerator http://blog.davidebbo.com/2011/06/precompile-your-mvc-views-using.html. Take a look. This way no physical files to deploy, only *.dll