TFS Build email alerts to the [Requested By] user

眉间皱痕 提交于 2019-12-04 05:14:42

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. 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:

To:

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

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

Yes - you will be able to do this with the next version of Team Foundation Server. I have an example of it here on my blog post: http://www.edsquared.com/2012/02/09/Creating+EMail+Alerts+For+Team+Members+In+TFS.aspx

You could install the TFS power tools and use the alerts explorer to set up email alerts. It's not perfect as I think each Developer needs to set up their own alert but if it's just the 2 of you that shouldn't be a problem

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!