Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I keep MSDeploy from deleting extra folders in my project?

I am using the MSBuild runner in Team city to build and deploy my project to a staging environment. Everything works perfectly except for the fact that it keeps removing my repository folder located in the root of the project.

In Visual Studio 2010 there is a check box in the publish profile dialog that says "Leave extra files on destination (do not delete)"

Is there a way to accomplish the same thing with MSBuild?

<Target Name="Deploy" DependsOnTargets="Build;Test">
        <MSBuild Projects="MyProject.sln" Properties="Configuration=$(Configuration); username=username; password=password; DeployOnBuild=True; DeployTarget=MSDeployPublish; MSDeployPublishMethod=WMSVC; MSDeployServiceUrl=https://DEVWEB01:8172/MsDeploy.axd; DeployIISAppPath=MyProject.$(Configuration); AllowUntrustedCertificate=True;"/>
</Target>
like image 252
Jeremy Seekamp Avatar asked Jul 23 '10 18:07

Jeremy Seekamp


1 Answers

Found the answer!

All you need to do is add the following property to the Properties attribute:

SkipExtraFilesOnServer=True;

like image 88
Jeremy Seekamp Avatar answered Nov 04 '22 15:11

Jeremy Seekamp