We are trying to configure continuous integration with TFS 2012. While queuing a new build, the publish fails with the error:
Build FAILED. \
I got this error when using msdeploy, not TFS. In my case I needed to make sure the user msdeploy is using had permission to deploy to the website.
Find the website in IIS manager, right click and go to Deploy, then Configure Web Deploy Publishing. Find the user used by Web Deploy and setup for this website.