Web Deployment Tool (MS Deploy)
Avoid MSdeploy package deleting all target files
Last post Feb 05, 2010 02:45 PM by outze
Feb 05, 2010 10:46 AM|outze|LINK
Hi, im am publishing to a win2003 server that has the Web Deployment Tools installed. The deployment package I create in VS 2010 deletes all the target files and only adds the files in the package. Is there any way to disable this deletion command so that
it only replaces the files in the package?
Im using the following command to deploy the package: Lingbay.Web.deploy.cmd /y
Feb 05, 2010 01:02 PM|moshaikh|LINK
just add the switch -enableRule:Donotdeleterule
You can read more about this
Feb 05, 2010 01:16 PM|Jamescoo|LINK
Found one link that talks about where this setting is located and there is a few others out there.
Does it help for your situation?
Feb 05, 2010 01:26 PM|outze|LINK
Hi thanks for your response. How do I add the switch? Currently im simply calling the deploy.cmd file that VS 2010 generates.
In the link you added it says its for Win 2008, im publishing to 2003 :/
Feb 05, 2010 01:27 PM|outze|LINK
Hi Jamescoo, unfortunately its not possible to use the 1-click-publishing for win 2003 yet (not working in VS 2010 beta 2).
Feb 05, 2010 02:12 PM|moshaikh|LINK
Modify the deploy.cmd file and add -enableRule:DoNotDeleteRule to the end of the command in there.
For e.g. change the following command
msdeploy -verb:sync -source:package=c:\sourcepackage.zip -dest:auto
msdeploy -verb:sync -source:package=c:\sourcepackage.zip -dest:auto -enableRule:DoNotDeleteRule
Feb 05, 2010 02:45 PM|outze|LINK
Hi thanks. That would do it, but then it won't be so automated as I wanted if I need to append that for each deploy - unless you have a batch command that can do just that :)