I am trying to automate the process of importing an application with the IIS Web Deployment Tool. Now we are doing this manually from within the IIS Manager.
I'm using a zip file that is created by using the publish operation from Visual Studio 2015 as source for the package.
When doing this import manually I can choose to overwrite existing files because I am deploying to an existing application. We always choose to only append the files without deleting existing files and folders because we need a folder named "CermData" that contains a certain .ini file that is not included in the zip file.
Using the following line in command promt:
msdeploy.exe -verb:sync -source:package=c:\Users\Administrator\Desktop\Web4Labels\CermWebServices.zip -dest:auto
results in the package being imported the way I want but I lose the "CermData" folder. Is there any way I can make sure the existing files are not overwritten?
Or am I using a wrong approach to do this? I'd like to make this automatic using cmd only if possible.
With msdeploy you'll need to add a the -enableRule:DoNotDeleteRule rule to prevent deletions.
See https://technet.microsoft.com/en-us/library/dd568992(v=ws.10).aspx for details.