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
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\*