从常规 .zip 文件创建 webdeploy 包

Create webdeploy package from regular .zip file

目前,作为构建过程的一部分,我们组织目标 wwwroot 文件夹结构并构建它的 .zip。这是我们的部署神器。

.zip 文件的结构是:

/App_Browsers
/App_Config
/App_data
/App_Start
/bin
/data
/dist
/layouts
/views
default.aspx
web.config

是否可以将此常规 .zip 文件转换为可以使用 webdeploy/msdeploy 部署的文件?或者 webdeploy/msdeploy 也可以部署常规 .zip 文件吗?

Is it possible to convert this regular .zip file to a file that can be deployed using webdeploy/msdeploy? Or can webdeploy/msdeploy also deploy regular .zip files?

答案是肯定的。

AFAIK,msdeploy 不支持使用非内置 windows zip 归档程序压缩的包。

因此,要解决此问题,您可以解压缩此常规 .zip 文件,并使用内置 windows zip 存档程序进行压缩,例如任务 Archive Files 任务或 7z.exe .

您可以查看 this thread 了解更多详情。

希望这对您有所帮助。