title: Build and Deploy a Web Application with TFS 2017 using Web Deploy Package
body: <p>My problem is similar to this</p>
  
  <p><a href="https://stackoverflow.com/questions/35351695/build-and-deploy-a-web-application-with-tfs-2015-build">Build and Deploy a Web Application with TFS 2015 Build</a> </p>
  
  <p>But, the solution is not working for me. I am working on Continuous Integration, and I have to Deploy a Web Application, and others Website, with the website I don't have problems creating the .zip Package for the deploy. I am using <code>/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(Build.StagingDirectory)\\"</code></p>
  
  <p>Then I am using Deploy  IIS App for extract the .zip Package in the virtual directory for the website.</p>
  
  <p><a href="https://i.stack.imgur.com/RsuBC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RsuBC.png" alt="enter image description here"></a></p>
  
  <p>But with the Web Application no matter what Arguments I use in the MSBuild Arguments nothing works, and I don't want copy all the file from the project to the server, and I would like an option different from remove the .sln and other file after the release from the server. </p>
  
  <p>I tried <code>/p:DeployOnBuild=True /p:PublishProfile=$(DeploymentConfiguration)</code> and I used a publish profile created as Web Deploy Package but after the build in the artifacts I get the same files, I mean all the projects files including .sln.</p>
  
  <p>I am not sure what should I expect in the artifact when I use <code>/p:DeployOnBuild=True /p:PublishProfile=$(DeploymentConfiguration)</code>, but I am not seeing changes. </p>
  
  <p>Can someone explain me what should I wait in this case?? and How to deploy correctly the Web Application Project using the TFS (because when I publish from the Visual Studio using the .pubxml works fine, in the server just the rights file are being copied) and the idea is make the Build and Release in the TFS no using nothing manual from Visal Studio.</p>
  
  <p>Any idea and explanation is going to be welcome, Thanks.</p>