Replace MSDeploy使用清单覆盖contentPath目录
在将contentPath提供程序与包含清单的MSDeploy包一起使用时,我试图覆盖安装目录 我肯定我以前也做过,但就是不能让它发挥作用 我错过了什么 用于创建包的清单:Replace MSDeploy使用清单覆盖contentPath目录,replace,msdeploy,webdeploy,Replace,Msdeploy,Webdeploy,在将contentPath提供程序与包含清单的MSDeploy包一起使用时,我试图覆盖安装目录 我肯定我以前也做过,但就是不能让它发挥作用 我错过了什么 用于创建包的清单: <siteManifest> <contentPath path="C:\packages" /> <runCommand path="do something here" /> </siteManifest> 更新 发现这对文件有效,但对目录仍然没有乐趣 msdep
<siteManifest>
<contentPath path="C:\packages" />
<runCommand path="do something here" />
</siteManifest>
更新
发现这对文件有效,但对目录仍然没有乐趣
msdeploy -verb:sync
-source:package=deploy.zip
-dest:auto
-replace:objectName=filePath,
targetAttributeName=path,
match=somefile\.txt
replace=newfile.txt
一种解决方案是将清单指定为目标,添加contentPath提供程序并将路径设置为覆盖位置。令人惊讶的是,当源包还包含一个带有contentPath提供程序的清单时,这种方法会起作用 destination.xml
<siteManifest>
<contentPath path="C:\OverrideLocation" />
</siteManifest>
它不应该是
而不是
和-dest:manifest=destination.xml
?
<siteManifest>
<contentPath path="C:\OverrideLocation" />
</siteManifest>
msdeploy -verb:sync
-source:package=deploy.zip
-dest:destination.xml