问题
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.
回答1:
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
来源:https://stackoverflow.com/questions/42364982/how-to-exclude-folder-in-web-deploy-v3-cmd-line-using-msdeploy-exe