[英]How to append webdeploy package to IIS site
I would like to deploy a webapplication that is composed of multiple webdeploy packages in following sequence 我想按以下顺序部署由多个webdeploy包组成的Web应用程序
Using PowerShell you can use the following commands to deploy a webdeploy package. 使用PowerShell,您可以使用以下命令来部署Webdeploy程序包。
Add-PSSnapin wdeploysnapin3.0
Restore-WDPackage -Package "Cms.Website.zip" -Parameters (Get-WDParameters -file .\Cms.Website.SetParameters.xml)
Restore-WDPackage -Package "Base.Modules.Login.zip" -Parameters (Get-WDParameters -file .\Base.Modules.Login.SetParameters.xml)
Restore-WDPackage -Package "Base.Modules.Search.zip" -Parameters (Get-WDParameters -file .\Base.Modules.Search.SetParameters.xml)
Restore-WDPackage -Package "CustomerABC.Website.zip" -Parameters (Get-WDParameters -file .\CustomerABC.Website.SetParameters.xml)
The problem is that the Restore-WDPackage
causes the website (that is defined in the SetParameters file) to be cleared in every install. 问题是
Restore-WDPackage
导致在每次安装中清除网站(在SetParameters文件中定义)。
I would like to clear the webroot during install of the first package, and I would like to be able to append files for the other 3 packages. 我想在安装第一个软件包的过程中清除webroot,并且希望能够为其他三个软件包附加文件。
Does anyone know if this is possible using PowerShell commands? 有谁知道使用PowerShell命令是否可行?
I don't see support for configuring rules with the Restore-WDPackage
cmdlet. 我看不到使用
Restore-WDPackage
cmdlet配置规则的支持。 If you can use the msdeploy.exe directly you can use the -enableRule:DoNotDeleteRule
flag. 如果可以直接使用msdeploy.exe,则可以使用
-enableRule:DoNotDeleteRule
标志。
http://dotnetcatch.com/2016/02/01/webdeploymsdeploy-quick-tip-keep-existing-files-during-deployment/ http://dotnetcatch.com/2016/02/01/webdeploymsdeploy-quick-tip-keep-existing-files-during-deployment/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.