title: Auto Deploy using Continuous Integration in TFS 2012
body: <p>I have setup continuous integration for a WCF project and want to use the MSBuild Arguments to automatically deploy the application to a remote server but it is not deploying.</p>
  
  <p>When running a new Build all the Tests pass and all the projects build but the website is not being deployed. Also, I am getting no errors back from the build to say anything has gone wrong.</p>
  
  <p>I have opened up port 8172 on the remote server to ensure connections can be made to IIS and have even disabled the firewall.</p>
  
  <p>In the Build Configuration I have specified the following arguments;</p>
  
  <pre><code>/p:DeployOnBuild=True /p:DeployTarget=MsDeployPublish /p:DeployIisAppPath="Default Web Site/MYSite" /p:MsDeployServiceUrl=http://mysite.com /p:username=MySite\Administrator /p:password=thePassword
  </code></pre>
  
  <p>I compiled this configuration from the following examples:</p>
  
  <p><a href="http://vishaljoshi.blogspot.co.uk/2010/11/team-build-web-deployment-web-deploy-vs.html" rel="noreferrer">http://vishaljoshi.blogspot.co.uk/2010/11/team-build-web-deployment-web-deploy-vs.html</a></p>
  
  <p><a href="http://www.chrissurfleet.co.uk/post/2011/07/21/Setting-Up-Continuous-Deployment-In-TFS.aspx" rel="noreferrer">http://www.chrissurfleet.co.uk/post/2011/07/21/Setting-Up-Continuous-Deployment-In-TFS.aspx</a></p>
  
  <p>I have configured the Server's IIS to enable remote connections and I can Remotely administer IIS from the build server. Also I have successfully deployed the Application using Visual Studio 2012 Publish option.</p>
  
  <p>can anyone see a problem with my MS Build Arguments? Am I missing anything?</p>
  
  <p>Any help would be very grateful</p>
  
  <p><strong>Update:</strong></p>
  
  <p>I have checked the build server to check MS deploy is installed and have installed Web Deploy 3.0 to ensure this is capabale, but has not solved my problem.</p>
  
  <p>I have check the IIS connection logs to see if the remote connection to IIS is being made and there is no connection being made from my build server to the app server.</p>
  
  <p>I have tried running MSBuild.exe for the solution and project on the build server manually with the following:</p>
  
  <p>MSBuild.exe "Project Location" /p:DeployOnBuild=True /p:DeployTarget=MsDeployPublish /p:MSDeployPublishMethod=WMSVC /p:DeployIisAppPath="Default Web Site/app" /p:MsDeployServiceUrl=<a href="http://appserver:8172/MSDeploy.axd" rel="noreferrer">http://appserver:8172/MSDeploy.axd</a> /p:AllowUntrustedCertificate=True /p:CreatePackageOnPublish=False /p:Username=username /p:Password=password</p>
  
  <p>The MSBuild is successfully building the project but is making no attemp to deploy it.</p>
  
  <p>Any Ideas?</p>