What is needed in the tfs 2010 build agent, to build .net 4.5 projects, in tfs 2008 we had to set the MSBuildPath property, but the configuration seems to be different in 2010.
I get the following error message. (614): The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
How we handled it in 2008 http://blogs.msdn.com/b/willbar/archive/2009/11/01/building-net-4-0-applications-using-team-build-2008.aspx
It's not necessary to install Visual Studio 2012. Just copy the files in the following folder from a computer with VS2012 installed to your build server and it should work:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\
You just need to install Visual Studio 2012 and you will be good to go.