Eva Lacy
Eva Lacy

Reputation: 1317

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.

Upvotes: 1

Views: 2535

Answers (2)

Richard Szalay
Richard Szalay

Reputation: 84744

Web Deploy 3.0 (currently RC) supports backing up of various providers.

Upvotes: 2

John Saunders
John Saunders

Reputation: 161773

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.

Upvotes: 1

Related Questions