I want to get the build status in TFS (whether it is succeeded or failed). Which classes and methods can be used for this purpose?
You can run Build Notifications, which is similar to CC Tray in that it will continually give you the status of all builds that you're interested in following. To launch the tool, go to...
All Programs-->Microsoft Visual Studio 2010-->Team Foundation Server Tools-->Build Notifications
Click on the Options button to subscribe to whichever builds are on your server. This will now show up in your system tray with a green check box or red X to indicate the status of the builds you've selected.
In Visual Studio 2013 with TFS 2013, you have email alerts from TFS and a Build Notification system tray tool: http://msdn.microsoft.com/en-us/library/ms181725.aspx
However, it usually doesn't show up in the Windows 8 Start screen, even with a search. So, run it manually in most installations from here:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\BuildNotificationApp.exe
The TFS API is mostly documented on MSDN under the Visual Studio SDK: http://msdn.microsoft.com/library/bb130146, however the build APIs are in a different location (in the TFS documentation): http://msdn.microsoft.com/library/cc339575.
These are the same assemblies that tf.exe and Team Explorer (etc.) use.
If you just want the alert (not programmatically): You can right-click on the project in the Team Explorer and select Project Alerts.
You can use AnyStatus to monitor both XAML and vNext builds and lots of other monitors such as Windows Services, HTTP, TCP/IP, Ping, GitHub, Other CI/CD tools, Performance Counters and more.
Disclaimer: I am the author of AnyStatus
Check out the MSBuildCommunityTasks library. It has a Mail task.
Import this into your build project to send the mails.
To enable build notification e-mail alerts, in Team Explorer:
If you are not already connected to the team project that you want to work in, then connect to the team project.
Choose Home, and then choose Settings.
On the Settings page, under Team Project, choose Project Alerts.
Select one or more alert events.
In the Send My Alerts To box, choose Edit and enter the email address of each person who should receive the alerts. Use semicolons to separate multiple email addresses.
more details, see : https://msdn.microsoft.com/en-us/library/ms181725.aspx
I just discovered CatLight which just works with little fuss. Never had any success with AnyStatus. CatLight sits in your tray and notifies you when builds succeed or fail.
Under TFS 2008, you can right click on the TFS Project name (in Team Explorer) and select Project Alerts.
Then pick the A Build Completes alert and put your email address into the Send To field.
I think TFS 2005 also has this feature, but I can't rememeber. It's been awhile. ;)
Related
We have several of our projects at my company in source control using Visual Studio Team Services (visualstudio.com). For the life of me I can't figure out how to get the workspace on my machine to flip to a Server workspace type. We don't want multiple checkouts and we want to get latest when we edit a file, and server workspaces (as I understand it) are the only way to accomplish this. Is it even possible to use server workspaces with the "cloud" version of TFS/Visual Studio Team Services?
Thanks!
Connect to your server with Visual Studio
Go to Team Explorer
Go to Settings
This part can be a little tricky so I attach a screen shot:
Under "Team Project Collection" go to Source Control
On the new dialog go to the second tab - Workspace Settings
So as you can see it is pretty obscure and I believe it is on purpose. By default the workspaces are of type "local" and these have their benefits. You may want to check out this article to make an informed decision: http://msdn.microsoft.com/en-us/library/bb892960.aspx
I've researched about how to send e-mails when build fails, but I only found personal options for this issue, changing my alerts configuration.
I want to send e-mails to users signed in the project. How can I configure this in my project configurations?
PS.: I'm using TFS from Visual studio 2013
When you're creating an alert in TFS 2013, you must specify the scope that the alert sites at ("Me" or "Team"). In TFS 2013, each Team Project will have a default team, so you can set the alert to be that specific team's alert, or a sub-team if you only want the alert to go to a subset of the overall Team Project. When you are configuring the alert in the alerts explorer, hit the Subscriber drop-down in the top right, and choose the appropriate team.
This may already be the site you found: http://msdn.microsoft.com/en-us/library/ms181725.aspx (sorry if this isn't what you're asking)
I have some alerts set up to be sent to myself and a few other individuals. And other alerts go to a larger distribution list.
Go to the control panel of your TFS project. It's the same url as your TFS project page which ends with "_admin" (http://yourtfsserver:8080/.../.../projectname/_admin)
Click on the "Alerts" tab. From the left side pane open the "ProjectName Team Alerts" item and select the "Build Alerts". On the main frame you'll find the query options to build team wide build alerts.
Hope this solves your problem.
As an alternative you may use ccTray: http://www.cruisecontrolnet.org/projects/ccnet
Perhaps you will manage to configure it with the help of this stack: Does TFS have anything like CCTray for Build Notifications?
For Cruise Control, I have CCTray that sits in my taskbar and lets me know if builds are happening or builds are breaking.
Does TFS have anything like this?
Or Start -> All Programs -> Visual Studio 2010 -> Team Foundation Server Tools -> Build Notifications
Personally, I find the Build Notifications app to be pretty terrible. It is slow for one. I find it better to just create email alerts whenever anything happens with a build. They are much more real time.
Edit: I just noticed you use TFS 2008. I don't have it installed to check but it should be roughly in the same location.
Edit 2: I realized the tool comes with TFS Power Tools. Find it here:
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=15836
UPDATE 2017-06-21: CatLight no longer has a free edition, unless used with an open source project. Details: https://catlight.io/editions
Visual Studio has an included application called "Build Notifications". This tool allows a (close-to) real-time status to be displayed of the current build status across one or more builds on the TFS Server. However it only works with XAML based builds, which are deprecated in favour of vNext builds.
There's a 3rd-party tool that does Build Status, notifications, bug monitoring and more for TFS (both XAML and vNext builds) and other systems (such as Jenkins). It's called CatLight and there's a free version that works with up to 10 builds - https://catlight.io/editions.
It is configured in a similar manner to CCTray, and is very easy to use.
Here are some screen-shots:
AnyStatus is another tool that supports multiple CI platforms, including Visual Studio vNext. It comes as a Visual Studio plug-in, and also as a Windows program (with tray icon and notifications).
More details here: https://stackoverflow.com/a/48291894/3063884
You can find Notification application here
"C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\BuildNotification.exe"
Is there a way to receive an alert (email) in TFS whenever I have a new task?
In TFS 2008: right-click project, Project Alerts and check "When my workitems are changed by others"
Team Foundation Power Tools - Alerts Editor
"Alerts Editor
A GUI tool plug-in to Visual Studio that supports flexible subscription of alerts based on check-in, work item change, or build completion."
For TFS 2010 there is an easy solution for you now, via a plugin which can be downloaded from
CodePlex - Team Alert
It's a simple copy-paste solution which can take you 5 minutes to put in place using the configuration extract listed in the post below. This plugin will also enable this rule to any user in the assigned to value, as opposed of setting up an alert for each user individually.
This post will show the exact configuration you need to perform the alert notification.
Notify AssignedTo user of new work (for a specific TFS project)
I like the status email sent by TFS's alerts mechanism when a build breaks.
However I would like to send such an email to the entire team and not rely on the team to subscribe to the alert...
Having a hard time producing a nice and detailed enough message by myself when overriding the "OnBuildBreak" and using the MSBuildCommunityTasks EMail task.
Is there a way to force a TFS alert to be sent to a list of emails?
Can you recommend of a way to send such status notifications?
You could try.
Brian the build bunny
:-)
The Team Build Tray Notification tool what is included in the TFS 2008 Power Tools is very useful for this.
See Buck Hodges' blog for screenshots and more information.
I don't want to dig up an old topic, but for those that stumble upon it two years late (like me), this is built into TFS 2010 now.
Set up an email alias for the team on the mail server, and enter this when subscribing to the mail.
Try the Team Foundation Server Event Subscription Tool.
This allows you to send emails to any address when any TFS event occurs.
Brian the Build bunny is nice but the Nabaztagtag WiFi Rabbit bunny is pretty expensive and is currently out of stock.
The Team Build Tray Notification that comes with TFS is ok, but:
It's damn slow and polling is not configurable
It's too easy to miss the build being broken for projects you care about
Doesn't support different actions for different projects (e.g. show a modal dialog for project #1, but just show a short tray alert for project #2)
Doesn't support different triggers for different people (e.g. show notifications for just me on project #1 or anyone on project #2)
No information on what broke the build (e.g. compiler error, unit test, integration test)
No audible notification if system's on mute
No last build times
So there's an open source project on Google Code that runs in the tray that's available on Google Code: http://code.google.com/p/siren-of-shame/. That project can work independently but it's designed to work with a USB Siren that is available for sale.
I generally like the TFS Build Status Tray by Rob Aquila. Be sure to get the 1.0.1 Beta, as this lets you easily specify the projects to watch using a bit of GUI and also has a notify icon that changes color, so you only need to open the actual build status list when the icon turns red. The 1.0 version had a fixed icon, and only notify toasts in the corner of your screen.
There is also a version of the same tool that is meant to be shown full screen on a wall mounted display for instance.
The July release of TFS 2008 PowerTools adds an "Alert Editor" to Team Explorer. Adding Alerts is a breeze. It has a query tool similar to the Query tool.
In my mind, a open source project named 'Web Deployment Projects' can do this. your can search for it.