As suggested in the comments to Raj Kaimal's answer, to get this working you can copy over the folder to the same location on the build machine.
If you want, you can also put that folder somewhere else in your machine, even relative to your project. You just need to add something to the csproj to redirect MSBuildExtensionsPath..
For example, I have the following in my csproj (works for VS2010 and VS2012):
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
<PropertyGroup>
<MSBuildExtensionsPath32>..\lib\MSBuild.MSVS\</MSBuildExtensionsPath32>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets"/>
Then, within my lib folder (which is a sibling of the folder containing the csproj), I have copied the following directories:
- %ProgramFiles%\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications →
MSBuild.MSVS\Microsoft\VisualStudio\v10.0\WebApplications
- %ProgramFiles%\MSBuild\Microsoft\VisualStudio\v10.0\Web → MSBuild.MSVS\Microsoft\VisualStudio\v10.0\Web