【问题标题】:How to exclude folder in Web Deploy V3 cmd line using msdeploy.exe如何使用 msdeploy.exe 在 Web Deploy V3 cmd 行中排除文件夹
【发布时间】:2017-02-21 10:38:24
【问题描述】:

我正在使用 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.

我在这段代码中做错了什么任何帮助都会有很大的帮助。

【问题讨论】:

    标签: msdeploy webdeploy


    【解决方案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--&gt;\\App_Data Configuration parameter

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-09-02
      • 2014-09-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多