Tuesday, 28 August 2012

Add an Alert on TFS when a build failed or partially succeeded

To get the notification related to your build you have launched the Team Foundation Build Notification tool to have a small popup alert every time a build finishes and starts.
But now you would like to go a bit further and receive a mail with the build result every time a build fails (or let's say do not succeed).
Use the TFS' alerts
The Team Foundation Server includes a powerful alert system, but by default, you cannot do so many things.

Use the Team Foundation Server Power Tools
If the Project Alerts does not allow so many things, the underlying alert system is very powerful. And you can use the Team Foundation Server Power Tools  that allow a very fine control of the alerts.

You can then create a new rule like the following one : 

Note that for the Send To field, you can either indicate an account name, or an email address. In the case of an account name, this corresponds to an AD account, and you must have configured the email address of that person in the Active Directory.


Build Failed with an error as SGEN: Unable to generate a temporary class (result=1). SGEN: Internal compiler error (0xc00000fd) SGEN: Out of memory

One of the build were continuously failing with an error as

But in other hand the same build were getting succeeded on 32 bits Build agent machine.
Then we triggered the same build on our other 62 bits Build agent and we found that all 62 bits build agent are giving the same error while compiling this build.
And finally we came to this conclusion that the versioning of MSBUILD.exe which is creating an issue not the Build agent machine.
It means to run the same build with green we have to trigger the build on 62 bits build agent but force them to take 32 bits MSBuild.exe to run this Build.
To do this we have to perform this.
Edit Build Definition
Processes ->Advance-> MSBuild Platform-> X86.

MD. Jawed