Posted By

jstrassburg on 10/07/10


Tagged

MSBuild buildstep


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Tyster


Custom Build Steps for MSBuild


 / Published in: XML
 

  1. <Target Name="MyTarget">
  2. <BuildStep
  3. Name="MyBuildStepName"
  4. Message="My message for %(ConfigurationToBuild.FlavorToBuild)"
  5. TeamFoundationServerUrl="$(TeamFoundationServerUrl)"
  6. BuildUri="$(BuildURI)"
  7. Condition="'$(IsDesktopBuild)'!='true'">
  8. <Output TaskParameter="Id" PropertyName="StepId" />
  9. </BuildStep>
  10.  
  11. <!-- DO SOMETHING THAT CAN FAIL -->
  12.  
  13. <BuildStep
  14. Id="$(StepId)"
  15. Name="MyBuildStepName"
  16. Status="Succeeded"
  17. TeamFoundationServerUrl="$(TeamFoundationServerUrl)"
  18. BuildUri="$(BuildURI)"
  19. Condition="'$(IsDesktopBuild)'!='true'" />
  20. <OnError ExecuteTargets="MyBuildStepError" />
  21. </Target>
  22.  
  23. <Target Name="MyBuildStepError">
  24. <BuildStep
  25. Id="$(StepId)"
  26. Name="MyBuildStepName"
  27. Status="Failed"
  28. TeamFoundationServerUrl="$(TeamFoundationServerUrl)"
  29. BuildUri="$(BuildURI)"
  30. Condition="'$(IsDesktopBuild)'!='true'" />
  31. </Target>

Report this snippet  

You need to login to post a comment.