简体   繁体   中英

Visual Studio post publish/or build solution ZIP

Is there a way to automatically Zip/archive the entire solution after I right click on the project file and click "Publish"?

I've ran into some issue trying to revert to previous versions of my application because I forgot to check everything in after a publish. And someimtes TFS is tricky to get a snapshot of the app at a given date. Having a ZIP archive of each time there was a publish or build would be very beneficial.

Common practice is to do that on build server side. Any continuous integration system allows to perform actions on successful build. Not a good practice to increase build time on developer's machine, because it would affect productivity.

If you are building a Web application, your website project should have a tab where you can set the "Package/Publish Web" settings for different build configurations. This should allow you to generate ZIP packages when building.

For the standard 'Debug' build that most developer's use on their machine, you won't want this on, but you might want to configure it for other build configurations.

Some good MSDN reads on the topic are:

ASP.NET Web Application Project Deployment Overview

How to: Create an Automated Build and Deployment Solution with Team Foundation Server Team Build

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM