我正在使用Nant使用TeamCity构建CI。在部署到服务器时,我坚持使用最后一段代码来排除App_Data文件夹。这是我的代码:
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.
我在这段代码中做错了任何帮助都会有很大的帮助。
答案 0 :(得分:1)
配置(为了便于阅读而添加了换行符):
-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
tfs.skip.directory
-->\\App_Data Configuration parameter