msdeploy命令实现远程部署时保留指定文件

我们做远程部署时有时会希望不改变web.config配置文件,那么在批处理文件中要执行skip命令

msdeploy -source:contentpath="C:\WebSite\Hello\WorkingDirectory\Hello\obj\Debug\Package\PackageTmp\" -dest:contentpath="D:\deploy" -verb:sync  -skip:absolutePath=web.config

参考文件http://blog.miniasp.com/post/2010/09/01/MSDeploy-Skip-Command-for-Webconfig-file.aspx

http://d2100.com/questions/32384

 

msdeploy.exe -verb:sync -dest:iisApp=MySite,wmsvc=www.mysite.com,username=administrator,password=blahblahblah -allowUntrusted -skip:absolutePath=webdeploy.cmd -skip:absolutePath=web.config -skip:objectName=dirPath,absolutePath="App_Data"-skip:objectName=dirPath,absolutePath="bin"-skip:absolutePath=vwd.webinfo -source:iisApp="C:\Users\charlie\Documents\Visual Studio 2010\WebSites\MySite"

posted @ 2012-11-06 13:35  717806198  阅读(649)  评论(0编辑  收藏  举报