views:

820

answers:

5

Hi,

I want get that Build status in TFS(whether it is succeeded or failed).Which classes and methods can be used for this purpose.

Thankyou somuch for your help.

+1  A: 

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.

Richard
A: 

Check out the MSBuildCommunityTasks library. It has a Mail task.

Import this into your build project to send the mails.

Gerrie Schenck
+1  A: 

If you just want the alert (not programmatically): You can right-click on the project in the Team Explorer and select Project Alerts.

GvS
A: 

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. ;)

Chris Lively
+1  A: 

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.

Pattrick King
Huzzah! ........
Peter Seale