简体   繁体   English

如何将Webdeploy包附加到IIS站点

[英]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应用程序

  1. webdeploy package containing website base (CMS files including web.config) 包含网站库的webdeploy软件包(CMS文件包括web.config)
  2. webdeploy package of specific module 1 特定模块1的webdeploy软件包
  3. webdeploy package of specific module 2 特定模块2的webdeploy软件包
  4. webdeploy package of application webdeploy应用程序包

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM