title: Build VS2013 on a TFS Build Server With Only VS2013
body: <p>I'm setting up a new build server to support a migration of our development team from VS2010 to VS2013. We are not migrating our TFS server just yet so the new build server has been set up as a VS2010 Build Controller with 2 Agents. I have also installed VS2013 on the machine (sledge hammer approach).</p>
  
  <p>All our code has been migrated to target .Net 4.5.1 and compiles fine on a developer's workstation.</p>
  
  <p>Most of our solutions build fine, except the solution that contains web projects. These projects are complaining:</p>
  
  <p>The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets" was not found.</p>
  
  <p>The imported project is using the VisualStudioVersion variable in the build process through these two lines:</p>
  
  <pre><code>&lt;VSToolsPath Condition="'$(VSToolsPath)' == ''"&gt;$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)&lt;/VSToolsPath&gt;
  ...
  &lt;Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" /&gt;
  </code></pre>
  
  <p>which according to this page:</p>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/vstudio/bb383796.aspx">http://msdn.microsoft.com/en-us/library/vstudio/bb383796.aspx</a></p>
  
  <p>will be set to "11.0" for both 4.5 and 4.5.1 targets. But the build machine only has a 12.0 version of the above path:</p>
  
  <p>"C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\WebApplications\Microsoft.WebApplication.targets"</p>
  
  <p>These same .csproj lines seem to be used in a brand new VS2013 project so I'm not sure how this could ever resolve correctly on a build machine.</p>