Search code examples
.netmsdeploywebdeploy

Does the Microsoft WebDeploy CLI tool deploy deltas when the source is a package?


I'm using msdeploy.exe to deploy packages from a build server and the deployment copies all the files each time. According to this article, "Web Deploy is smart enough to compare the remote server with your local project – and only copy the files it needs to." I don't see any command line options that affect this, so I'm wondering if this only works when syncing one IIS site from another verses syncing a site from a package.

Here is the approximate command I'm issuing in case that helps in answering the question.

msdeploy.exe -verb:sync -source:package="C:\[path]/deploymentPackage.zip" -dest:auto,computerName="server.com",includeAcls="False" -setParamFile="C:\[path]/parameterFile.xml"

Solution

  • By default WebDeploy/MSDeploy only copies "changed" files to the target. By default it uses filesize and datetime stamp to determine changed files. So each new build will likely copy all files to the target.

    Alternatively you can set the -useCheckSum flag on the MSDeploy.exe command to identity changed files based on the contents of the file instead.

    https://technet.microsoft.com/en-us/library/dd569089(v=ws.10).aspx