Avoid MSdeploy package deleting all target files [Answered]RSS

6 replies

Last post Feb 05, 2010 02:45 PM by outze

  • Avoid MSdeploy package deleting all target files

    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

    Thanks,
    Anders

    http://lingbay.com - A marketplace for linguistic jobs
  • Re: Avoid MSdeploy package deleting all target files

    Feb 05, 2010 01:02 PM|moshaikh|LINK

    just add the switch -enableRule:Donotdeleterule

    You can read more about this here

  • Re: Avoid MSdeploy package deleting all target files

    Feb 05, 2010 01:16 PM|Jamescoo|LINK

    Hi Outze,

    Found one link that talks about where this setting is located and there is a few others out there.

    http://weblogs.asp.net/owscott/archive/2009/06/06/visual-studio-2010-1-click-publishing.aspx

    Does it help for your situation? 

  • Re: Avoid MSdeploy package deleting all target files

    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 :/

    http://lingbay.com - A marketplace for linguistic jobs
  • Re: Avoid MSdeploy package deleting all target files

    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).

    http://lingbay.com - A marketplace for linguistic jobs
  • Re: Avoid MSdeploy package deleting all target files

    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

    To

    msdeploy -verb:sync -source:package=c:\sourcepackage.zip -dest:auto  -enableRule:DoNotDeleteRule

  • Re: Avoid MSdeploy package deleting all target files

    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 :)

    http://lingbay.com - A marketplace for linguistic jobs