Execute Batch File After Tfs Build Errors

Hi, Currently we are using TFS 2010. Advanced Folder Encryption Serial Number here. I have automated the build using team build definition which will build the solution also it will execute all the unit test cases for the respective project. If any one of the unit test case fails it would fail the build and it will show the unit test case results (i.e. How many test cases passed/failed) I want to execute a batch file which will take all the unit test cases result and send mail to me.

Can anyone please tell/guide me after which activity (in team build definition) I should run/ call my batch script to achieve this? Thanks in advance.

See More On Stackoverflow

Hi stars123, Here are the step by step process. Hope it will sovle your problem 1. I would recommend to keep the batch file on build server, if you wish to keep out off build server then keep in shared folder where build server have access to it 2. Open BUild workFlow ->Drag and Drop the 'InvokeProcessActivity' ->Right Click on Invoke Process Activity and Select properties ->give the path to Batch FIle ( Step 3,4 and 5 are optional, while executing batch script these activities will log the messages in build log file) 3.

Visual Studio Pre/Post- Build Events. Visual Studio has a nifty feature called Pre- Build and Post- Build events. Run a bat file on Visual Studio build event. Unable to execute a.bat file in post build event. But then I would say the call to the batch file is. Getting same error. Is it necessary to execute cmd. Apr 10, 2011 hi guys, a little help please, can someone point me to the right direction on how to run a script (batch file or anything) after Manual or nightly builds. Jul 26, 2012 Hi, Currently we are using TFS 2010. I have automated the build using team build definition which will build the solution also it will execute all the unit.

Expand the InvokeProcess Activity ->Drag and drop the 'Writebuild Message' and 'WriteBuildError' activites as shown below 4. Right click on'WriteBuildMessage'activity and Set Properties Importance -- Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High Message -- stdOutPut 5. RIght Click on'WriteBuildError' Activity and Set Properties Message -- errOutPut Save it and Queue the new build, Should be good to go. THanks Haribabu Bavanari.

Hi stars123, Here are the step by step process. Hope it will sovle your problem 1. I would recommend to keep the batch file on build server, if you wish to keep out off build server then keep in shared folder where build server have access to it 2.

Open BUild workFlow ->Drag and Drop the 'InvokeProcessActivity' ->Right Click on Invoke Process Activity and Select properties ->give the path to Batch FIle ( Step 3,4 and 5 are optional, while executing batch script these activities will log the messages in build log file) 3. Manvasanai Serial Episode 10. Expand the InvokeProcess Activity ->Drag and drop the 'Writebuild Message' and 'WriteBuildError' activites as shown below 4. Right click on'WriteBuildMessage'activity and Set Properties Importance -- Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High Message -- stdOutPut 5. RIght Click on'WriteBuildError' Activity and Set Properties Message -- errOutPut Save it and Queue the new build, Should be good to go.

THanks Haribabu Bavanari.

I tried your suggestion and put the CopyDirectory activity after 'Try Compile, Test and Associate' activity and its perfectly working, btw, can anybody direct me on how to automate publishing/deploying web contents from development to staging(external server) then to production? Does it use CMS/Content Management System? I can automate putting a zip copy of the web contents to staging through FTP, only problem is how can i extract and put it to the website directory. I'm thinking of a Web based File Manager with zip/unzip support but i can't find a.net version. Hi Arnel, If you want to execute a batch file you can use the InvokeProcess activity to do this. Open the build definition and open the toolbo and drag the InvokeProcess activity to the corresponing place in the build process workflow.