Deploying from TFS gives error Web deployment task failed. (Site http: does not exist.)

When you’re deploying your Web Application from TFS to an IIS Web Application you might encounter the error Web deployment task failed. (Site http: does not exist.)

Web deployment task failed.

If you got this error, it’s probably because in TFS you set the”/p:DeployIISAppPath” to the URL of a website, for example /p:DeployIISAppPath=”http://vlad.domain.com” (opens in a new tab) . The correct way to specify the parameter is giving the actual name of the website from IIS, for example /p:DeployIISAppPath=”Default Web Site” . Now your error should go away!