计划每晚构建 msbuild 任务
我正在使用 MSBuild 从命令提示符构建我们的测试项目,该项目又使用 nunit 并给出结果。我想将其安排在每晚,以便它自动运行 msbuild 并获取结果。我有什么办法可以做到这一点吗?
I am using MSBuild for building our test project from command prompt which inturn uses nunit and gives the results. I want to schedule it nightly so that it automatically runs the msbuild and get the results. Is there any way I can do that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我建议为此使用持续集成服务器。您可以设置持续集成服务器来安排构建和许多其他任务。就我个人而言,我使用 Jetbrains 的 Team City,但还有其他可用选项,例如 Cruise Control.net 和 哈德森。
您到底想对结果做什么?如果您只需要运行构建脚本,那么一个简单的计划任务就可以完成。
I would recommend using a Continuous integration server for this. You can set up your continuous integration server to schedule builds and a number of other tasks. Personally, I use Team City from Jetbrains, but there are other options available, such as Cruise Control.net and Hudson.
What exactly do you want to do with the results? If you just need to run your build script, a simple scheduled task should do it.
我公司解决这个问题的方法是使用Powershell。我们有一个计划任务,该任务执行一个 powershell 脚本,该脚本使用 MSBuild 和 devenv.exe 完全自动化该过程。
通过这个过程,我们已经能够消除许多其他持续集成工具的费用。我们甚至将它连接到我们的 svn 服务器,以便它可以检查最新版本、构建它、在构建错误时发送电子邮件并将屏幕输出作为结果日志发送。
我意识到这可能不是您正在寻找的简单答案,但 Powershell 对我来说真的很容易学习,高度可定制,而且非常强大。当我的主管说我们要朝这个方向移动时,我有些怀疑,但我很高兴。
The way my company solved the problem was to use Powershell. We have a scheduled task that executes a powershell script that completely automates the process using MSBuild and devenv.exe.
We've been able to do away with the expense of many other continuous integration tools with this process. We have even connected it to our svn server so that it can checkout the latest revision, build it, send out an email if there was a build error and send the output of the screen as a result log.
I realize this might not be simple answer you're looking for, but Powershell was really easy for me to learn, exceedingly customizable, and very powerful. I had doubts when my Director said we were moving this way, but it's been a delight.