Visual Studio Web Deploy backup before publish

I use Visual Studio Web Deploy for an MVC and WCF projects, I'd like that whenever I publish that the deployment directory is backed up in a zip file.

I had a look at the "BeforePublish" target in MSBuild but I'm not sure if that's the best way to go about it, nor do I know how to get the output directory.

So Question is, how do I copy the output directory before publish to a zip file named Web-%datetime%.zip .

Thanks in advance.


We use TFS Team Build to build our web applications and produce a package. The deployment script we use simply does a sync to a backup package before doing a sync from the built package to the target web site.


Web Deploy 3.0(当前为RC)支持备份各种提供程序。

链接地址: http://www.djcxy.com/p/81694.html

上一篇: 如何完全卸载Visual Studio 2010?

下一篇: Visual Studio Web在发布之前部署备份