MSDeploy fails to deploy manually zipped package

后端 未结 3 1909
孤街浪徒
孤街浪徒 2021-01-12 07:44

Earlier I was building and deploying web project using msbuild.exe

Now I want to modify some files before deploying, so I make a .zip package using msbuild, then unz

3条回答
  •  旧时难觅i
    2021-01-12 08:22

    I had this exact problem. I've got a bunch of msdeploy packages and need to update some of the files post-packaging but pre-deploy.

    If I use msdeploy sync to extract the packages, the parameters get processed - that's no good, they're just placeholders until I know which environment is being targeted. So I need to unzip the package and then make the changes...so far so good.

    But then I rezip it all up. And then then I get this issue: msdeploy won't process the contained folders. If I use msdeploy to process the extracted files, again I lose the parameters...or rather they get processed prematurely from the paramters.xml file. Grr.

    The solution? Use 7zip...or anything apart from standard Windows zipper.

    e.g. 7z.exe a -r C:\deploys\mypackage.zip C:\extractedstuff\*

提交回复
热议问题