I am attempting to use Visual Studio\'s Team Explorer and TFS to create a Build Definition to deploy a MVC site to IIS.
I followed the Pluralsight tutorial called \'
Here are my settings that worked for me. Try to change the CreatePackageOnPublish=True and see if it works or not.
/p:DeployOnBuild=True
/p:DeployTarget=MsDeployPublish
/p:CreatePackageOnPublish=True
/p:MSDeployPublishMethod=WMSVC
/p:MSDeployServiceUrl=https://ServerName:8172/MSDeploy.axd /p:DeployIisAppPath="NameofWebsiteOnIISServer"
/p:AllowUntrustedCertificate=True
/p:UserName="domain\serviceaccount"
/p:Password="AwesomeSecurePassword"
First I would recommend is to check whether you are able to publish through visual studio directly via webdeploy or not. The best way to figure out the right settings of web deploy inside visual studio is listed below. I recommend this approach because it will give you error messages v/s "queue a new build everytime" to see if site was published or not.
If you get errors then this site (http://www.iis.net/learn/publish/troubleshooting-web-deploy/web-deploy-error-codes) has all the error messages related to it.
Make sure if the service account you specified is listed in "IIS Manager Permissions" section under Management.
Also check if "Web Management Service" and "Web Deployment Agent Service" services are running.