【问题标题】:MSDeploy override contentPath directory with manifestMSDeploy 使用清单覆盖 contentPath 目录
【发布时间】:2013-05-03 10:57:06
【问题描述】:

在将 contentPath 提供程序与包含清单的 MSDeploy 包一起使用时,我试图覆盖安装目录。

我确定我过去曾这样做过,但就是无法让它发挥作用。

我错过了什么?

用于创建包的清单:

<siteManifest>
  <contentPath path="C:\packages" />
  <runCommand path="do something here" />
</siteManifest>

安装包命令:

这直接来自文档here

msdeploy -verb:sync 
         -source:package=deploy.zip 
         -dest:auto 
         -replace:objectName=contentPath,
                  targetAttributeName=path,
                  replace=C:\otherPath

更新

发现这对文件有效,但对目录仍然没有乐趣。

msdeploy -verb:sync 
         -source:package=deploy.zip 
         -dest:auto 
         -replace:objectName=filePath,
                  targetAttributeName=path,
                  match=somefile\.txt
                  replace=newfile.txt

【问题讨论】:

    标签: replace msdeploy webdeploy


    【解决方案1】:

    一种解决方案是将清单指定为目标,添加 contentPath 提供程序并将路径设置为覆盖位置。令人惊讶的是,当源包还包含带有 contentPath 提供程序的清单时,这会起作用。

    destination.xml

    <siteManifest>
       <contentPath path="C:\OverrideLocation" />
    </siteManifest>
    

    命令:

    msdeploy -verb:sync 
         -source:package=deploy.zip 
         -dest:destination.xml
    

    【讨论】:

    • 不应该是&lt;sitemanifest/&gt;而不是&lt;siteManifest/&gt;-dest:manifest=destination.xml吗?
    猜你喜欢
    • 1970-01-01
    • 2018-01-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-01-09
    • 2020-05-30
    • 2019-07-24
    相关资源
    最近更新 更多