[英]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. 而且,TFS很难获得给定日期的应用程序快照。 Having a ZIP archive of each time there was a publish or build would be very beneficial. 每次进行发布或构建时都有一个ZIP存档将非常有益。
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. 如果要构建Web应用程序,则您的网站项目应具有一个选项卡,您可以在其中为不同的构建配置设置“打包/发布Web”设置。 This should allow you to generate ZIP packages when building. 这应该允许您在构建时生成ZIP包。
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: 有关该主题的一些不错的MSDN读物是:
ASP.NET Web Application Project Deployment Overview ASP.NET Web应用程序项目部署概述
How to: Create an Automated Build and Deployment Solution with Team Foundation Server Team Build 如何:使用Team Foundation Server创建自动化的构建和部署解决方案
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.