Jim Lobo
Jim Lobo

Reputation: 491

How to exclude folder in Web Deploy V3 cmd line using msdeploy.exe

I am in the process of building CI using TeamCity using Nant. I have stuck with the last piece of code to exclude App_Data folder while deploying to the server. Here is my code :

C:\Program Files\IIS\Microsoft Web Deploy V3>msdeploy.exe 
-verb:sync 
-source:contentPath="C:\a\testteamcity\Demo\WebApp\obj\Release\Package\PackageTmp"  
-dest:contentPath='prod.test/deploy'
-skip:Directory="App_Data" -skip:objectName=dirPath,absolutePath="\\App_Data"
,ComputerName="https://XXX:8172/msdeploy.axd?prod.
test",UserName='XXX\abc',Password=****',AuthType='Basic' 
-allowuntrusted -usechecksum 



Error: Unrecognized skip directive 'Directory'. Must be one of the following: "objectName," "keyAttribute," "absolutePath," "xPath," "attributes.<name>."
Error count: 1.

what I am doing wrong in this code Any Help would be a great help.

Upvotes: 1

Views: 1634

Answers (1)

Jim Lobo
Jim Lobo

Reputation: 491

Configuration (line breaks added for readability):

-verb:sync 
-source:contentPath="D:\Releases\1.107.1323" 
-dest:contentPath='%system.website%',
      ComputerName="%system.computername%%system.226.website%",
      UserName='%system.un%',
      Password='%system.pw%',
      AuthType="Basic" 
-skip:Directory="%tfs.skip.directory%" 
-EnableRule:DoNotDeleteRule 
-allowuntrusted 
-usechecksum

where tfs.skip.directory -->\\App_Data Configuration parameter

Upvotes: 2

Related Questions