kamagra how much to take

Chaining SharePoint Builds Status

So I am still in migration hell and fixing some build code. One of the problems we just ran into was chaining build events. Consider if you had SharePoint project X which contained and Exec command that triggered SharePoint project Y. The goal of their custom build is to query into the build status of SharePoint project Y, and display the build status in SharePoint project X’s build status. Put simply, I needed a mechanism where Project Y build status, like whether it returns Success, Partial Success, etc.

Fortunately, this isn’t terribly difficult using the Exec task to execute a command leveraging the exitcode to get the status. This looks like the following:

  1. <Target Name="MyBuildTarget">
  2.     <Exec Command="tfsbuild start /server:myserver /builddefinition:\mytfsproject\buildprojectb" ContinueOnError="true">
  3.       <Output  TaskParameter="ExitCode" PropertyName="BuildProjectExitCode"/>
  4.     </Exec>
  5.      <Message Text="BuildProjectExitCode=$(BuildProjectExitCode)"></Message>
  6.   </Target>

The exitcode return will be an integer, which is easy to correlate to the respective return values, Failure is 100, Partial Success is 1, Success is 0, Unknown is -1, and Unrecognized Command is 2.

Share

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>