Syska
Syska

Reputation: 1149

Parsing argument to MSDeploy from MSBuild

I have just started playing with TeamCity and its great. Now I got it to deploy to my staging server after a commit so I always know I have the latest version running there. ( The idea was borrowed from: http://www.agileatwork.com/automatic-deployment-from-teamcity-using-webdeploy/ )

But as the site generates some files which I dont want to wipe out on every publish I found the parameter to MSDeploy

-enableRule:DoNotDeleteRule

But how do I append this to MSBuild command

MSBuild.exe MvcApplication1.sln 
 /p:Configuration=Debug 
 /p:OutputPath=bin 
 /p:DeployOnBuild=True 
 /p:DeployTarget=MSDeployPublish 
 /p:MsDeployServiceUrl=https://ss-iis:8172/MSDeploy.axd 
 /p:username=user
 /p:password=pass
 /p:AllowUntrustedCertificate=True 
 /p:DeployIisAppPath=foo.bar.tld 
 /p:MSDeployPublishMethod=WMSVC 

Can this be done?

Or is there are a more fancy way of doing automatic web deployments from TeamCity?

Upvotes: 3

Views: 1000

Answers (1)

Greg
Greg

Reputation: 2179

It might be /p:SkipExtraFilesOnServer=true that you want.

Upvotes: 10

Related Questions