Most of the time when you are creating a build script (TFSBuild.proj), you need to do some steps after the build. Wether it’s creating an MSI for easier deployment, creating a VSI for a Visual Studio Add-in, or whatever if may be… you normally do a post build.
A post build event looks like the following inside the TFSBuild.proj :
1 | <Target Name="AfterDropBuild"> |
When you only have 1 or 2 tasks and that one fails, it might be easy to find the one that failed. What if you have 8 to 20 tasks? It then becomes incredibly hard to find which one failed. What I’ve seen the most is normally some “
What if you could know EXACTLY which task failed to run? Here is a way to add a custom build step to your TFS build which will allow you to easily know what crashed.
1 | <Target Name="PostBuildStep"> |
With that in place, you will see exactly which task failed. As a bonus, it will also give you the time at which it completed. This will easily allow you to compare with your other task to see which one is taking the most time.
I would like to thank Martin Woodward which is a TeamSystem MVP. The question originated from Stackoverflow and more details are also available on Martin’s website.