We currently run builds on TFS. Is it possible to precompile views during TFS builds?
It's possible to pre-compiling the Asp.net MVC views on TFS.
You need to Extend the Visual Studio Build Process, introduce a new BuildViews target that will only execute if the MvcBuildViews property is set to true.
<Target Name="BuildViews" Condition="'$(MvcBuildViews)'=='true'" AfterTargets="Build">
<Message Importance="normal" Text="Precompiling views" />
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(WebProjectOutputDir)" />
</Target>
Reference below article, refer to it for more information:
Turn on Compile-time View Checking for ASP.NET MVC Projects in TFS Build 2010