如何使用 msdeploy.exe 在 Web Deploy V3 cmd 行中排除文件夹 [英] How to exclude folder in Web Deploy V3 cmd line using msdeploy.exe
本文介绍了如何使用 msdeploy.exe 在 Web Deploy V3 cmd 行中排除文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 Nant 使用 TeamCity 构建 CI.在部署到服务器时,我坚持使用最后一段代码来排除 App_Data 文件夹.这是我的代码:
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.
推荐答案
配置(为了可读性添加换行符):
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 配置参数
这篇关于如何使用 msdeploy.exe 在 Web Deploy V3 cmd 行中排除文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文