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
Don't use zip archiver. You must call msdeploy.exe.
bat-file example :
msdeploy.exe -verb:sync ^
-source:archiveDir="C:\YourAbsolutePathToTheFolderContaining_Content_DirAnd_XMLs" ^
-dest:package="ArchName.zip" ^
-declareParam:name="IIS Web Application Name",defaultValue="Default Web Site/AppName",tags="IisApp" ^
-declareParam:name="IIS Web Application Name",type="ProviderPath",scope="IisApp",match="^.*PackageTmp$" ^
-declareParam:name="IIS Web Application Name",type="ProviderPath",scope="setAcl",match="^.*PackageTmp$"
For more info look at help:
msdeploy -help -dest
msdeploy -help -declareParam
and other. Also, see parameters.xml