title: How to implement a check-in dance feature in Visual Studio 2012 with TFS 2012
body: <p>We want a feature we feel would save our team a lot of time. </p>
  
  <p>We have a build server that performs gated check-ins but it is old and heavily burdened. If we can avoid putting load on our build server then we need to.</p>
  
  <p>When a developer tried to check in to TFS [also git, Mercurial if possible], visual studio should instead:</p>
  
  <ol>
  <li>Get latest.</li>
  <li>Clean the solution.</li>
  <li>Build the solution.</li>
  <li>Run all the smoke unit tests.</li>
  <li>if they pass, then check in to TFS.</li>
  </ol>
  
  <p>Does anyone know how to implement this in visual studio or with macros or an open source or commercial tool?</p>