TFS生成电子邮件警报到[请求者]用户 [英] TFS Build email alerts to the [Requested By] user

查看:471
本文介绍了TFS生成电子邮件警报到[请求者]用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能吗?
我和我的同事之一,现在正在寻找这种一会儿解决方案,我们无法找到谷歌类似的事情。

Is this possible? Me and one of my co-worker are looking for this kind of solution for a while now and we can't find anything similar on Google.

事情很简单。我们希望当他或她打破2010 TFS构建自动提醒通过电子邮件的[请求者]用户怎样才能做到这一点,必须有一个解决方案,Microsoft不能忘了,可以是最简单的功能之一加...

The thing is simple. We want to automatically alert the [Requested By] user by email when he or she break the build on TFS 2010. How can we do this, there must be a solution, Microsoft can't had forgotten one of the simplest feature that can be added...

谢谢您的回答。如果您需要了解我的问题进一步澄清,请咨询!

Thanks for your answers. If you need more clarifications about my question, please ask!

推荐答案

您可以这样做,但你必须定制生成过程,或者使用Web服务,我已经通过定制我们的构建过程中做到了这一点。我用的用户列表从 associatedChangesets 而不是按要求。

You can do this, but you have to customise the build process or use web services, I've done this by customising our build process. I used a list of users from associatedChangesets instead of requested by.


  1. 获取 TFS构建Extenstions

  2. 打开您的构建过程模板(导游 href=\"http://www.dotnetcurry.com/ShowArticle.aspx?ID=494\">和的这里)。

  3. 导航到如果一个编译异常发生一节。

  4. 从对电子邮件活动将TFS生成扩展。

  5. 在收件人字段中输入以下VB.Net:

  1. Get the TFS Build Extenstions.
  2. Open your build process template (guides here and here).
  3. Navigate to the "If a Compilation Exception Occurred" section.
  4. Drag on the "Email" activity from the "TFS Build Extensions".
  5. In the "To" field enter the following VB.Net:

New String() { _
    DirectCast(
        New System.DirectoryServices.DirectorySearcher( _
        String.Format("(&(objectClass=user)(|{0}))", BuildDetail.RequestedBy)) _
        .FindOne(), SearchResult) _
        .Properties("mail")(0).ToString() _
}

6:完成其余字段中的电子邮件活动

6: Complete the rest of the fields in the Email activity.

这篇关于TFS生成电子邮件警报到[请求者]用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆