<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Aaron Hallberg : Team Build Orcas</title><link>http://blogs.msdn.com/aaronhallberg/archive/tags/Team+Build+Orcas/default.aspx</link><description>Tags: Team Build Orcas</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Orcas Object Model Documentation</title><link>http://blogs.msdn.com/aaronhallberg/archive/2007/05/04/orcas-object-model-documentation.aspx</link><pubDate>Fri, 04 May 2007 16:36:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2410062</guid><dc:creator>aaronhallberg</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/aaronhallberg/comments/2410062.aspx</comments><wfw:commentRss>http://blogs.msdn.com/aaronhallberg/commentrss.aspx?PostID=2410062</wfw:commentRss><description>&lt;P&gt;I put together a chm file for the Orcas Microsoft.TeamFoundation.Build.Client and Microsoft.TeamFoundation.Build.Common namespaces the other day using &lt;A href="http://blogs.msdn.com/sandcastle/" mce_href="http://blogs.msdn.com/sandcastle/"&gt;Sandcastle&lt;/A&gt; and the invaluable &lt;A href="http://www.codeplex.com/SHFB" mce_href="http://www.codeplex.com/SHFB"&gt;Sandcastle Help File Builder&lt;/A&gt;, so here it is.&amp;nbsp; Please keep in mind that this is preliminary documentation,&amp;nbsp;everything is subject to change before RTM, etc.&lt;/P&gt;
&lt;P&gt;We'd love to hear what you think of the Orcas Team Build features, including the Object Model, so please download Beta 1, check out these docs, and post any comments/question/concerns you might have.&lt;/P&gt;
&lt;P&gt;Note: attachment removed.&amp;nbsp; Please grab the &lt;A class="" href="http://blogs.msdn.com/aaronhallberg/archive/2007/08/14/orcas-beta-2-object-model-documentation.aspx" mce_href="http://blogs.msdn.com/aaronhallberg/archive/2007/08/14/orcas-beta-2-object-model-documentation.aspx"&gt;Beta 2 documentation&lt;/A&gt; instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;-Aaron&amp;nbsp; &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2410062" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/aaronhallberg/archive/tags/Team+Build+Orcas/default.aspx">Team Build Orcas</category></item><item><title>TfsBuild.rsp and Logging Verbosity in Orcas</title><link>http://blogs.msdn.com/aaronhallberg/archive/2007/05/03/tfsbuild-rsp-and-logging-verbosity-in-orcas.aspx</link><pubDate>Thu, 03 May 2007 19:55:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2396841</guid><dc:creator>aaronhallberg</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/aaronhallberg/comments/2396841.aspx</comments><wfw:commentRss>http://blogs.msdn.com/aaronhallberg/commentrss.aspx?PostID=2396841</wfw:commentRss><description>&lt;P&gt;In the 2.0 .NET Framework, MSBuild's default verbosity for its FileLogger was "normal".&amp;nbsp; As such, if you needed diagnostic logging information in a Team Build build (e.g. for debugging an issue with the build process) you needed to add the following to your TfsBuild.rsp file:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;/verbosity:diagnostic&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;-or more briefly-&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;/v:diag&lt;/STRONG&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;In the 3.5 .NET Framework, lots of things have changed with respect to the MSBuild file logger.&amp;nbsp; First of all, the default verbosity for the FileLogger is now "diagnostic" rather than "normal".&amp;nbsp; Secondly, the FileLogger now has its own command-line options - &lt;STRONG&gt;/fileLogger&amp;nbsp;&lt;/STRONG&gt;(/fl)&amp;nbsp;turns on file logging, while &lt;STRONG&gt;/fileLoggerParameters&lt;/STRONG&gt; (/flp) is used to pass parameters into the file logger.&amp;nbsp; So - to set logging versobity back to normal in a Team Build build in Orcas&amp;nbsp;(e.g. when you are &lt;EM&gt;not&lt;/EM&gt; debugging an issue with the build process and want to keep your log files small) you will need to add the following to your TfsBuild.rsp file:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;/fileLoggerParameters:verbosity=normal&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;-or more briefly-&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;/flp:v=n&lt;/STRONG&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Another thing you may notice if you look closely is that Team Build no longer passes too many options to MSBuild directly through the command-line.&amp;nbsp; Instead, we dynamically generate a new copy of TfsBuild.rsp that contains the standard Team Build options followed by whatever you have in your checked in TfsBuild.rsp (if anything).&amp;nbsp; As such, a typical TfsBuild.rsp file on a build machine might look something like this:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;### Begin Team Build Generated Arguments ### &lt;/P&gt;
&lt;P&gt;/m:4&lt;BR&gt;/nologo&lt;BR&gt;/noconsolelogger&lt;BR&gt;/dl:BuildLogger,&lt;EM&gt;&amp;lt;BuildLogger Assembly&amp;gt;;&amp;lt;BuildLogger Parameters&amp;gt;&lt;BR&gt;&lt;/EM&gt;&lt;STRONG&gt;/fl /flp:logfile=BuildLog.txt;encoding=Unicode;&lt;/STRONG&gt;&lt;BR&gt;/p:BuildDefinition="BuildDefinition" &lt;BR&gt;/p:DropLocation="\\MACHINENAME\DropLocation" &lt;BR&gt;/p:BuildProjectFolderPath="$/TeamProject/TeamBuildTypes/BuildDefinition"&lt;BR&gt;/p:BuildUri="vstfs:///Build/Build/1" &lt;BR&gt;/p:TeamFoundationServerUrl="http://tfs:8080"&lt;BR&gt;/p:TeamProject="TeamProject" &lt;BR&gt;/p:SourcesSubdirectory="Sources" &lt;BR&gt;/p:BinariesSubdirectory="Binaries" &lt;BR&gt;/p:TestResultsSubdirectory="TestResults" &lt;BR&gt;/p:SourceGetVersion="C3" &lt;BR&gt;/p:LastGoodBuildLabel="" &lt;BR&gt;/p:LastBuildNumber="" &lt;BR&gt;/p:LastGoodBuildNumber="" &lt;BR&gt;/p:NoCICheckInComment="***NO_CI***" &lt;BR&gt;/p:IsDesktopBuild="false" &lt;BR&gt;/p:TeamBuildRefPath="C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies" &lt;BR&gt;/t:EndToEndIteration 
&lt;P&gt;TFSBuild.proj 
&lt;P&gt;### End Team Build Generated Arguments ### 
&lt;P&gt;### Begin Checked In TfsBuild.rsp Arguments ### 
&lt;P&gt;# This is a response file for MSBuild&lt;BR&gt;# Add custom MSBuild command line options in this file 
&lt;P&gt;&lt;STRONG&gt;/flp:verbosity=normal &lt;/STRONG&gt;
&lt;P&gt;### End Checked In TfsBuild.rsp Arguments ###&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Again, if you look carefully here you may notice the &lt;STRONG&gt;/m:4&lt;/STRONG&gt; option at the top of the sample rsp file.&amp;nbsp; This has to do with MSBuild 3.5's new multi-process feature - more on this in a subsequent post!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2396841" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/aaronhallberg/archive/tags/MSBuild/default.aspx">MSBuild</category><category domain="http://blogs.msdn.com/aaronhallberg/archive/tags/Team+Build+Orcas/default.aspx">Team Build Orcas</category></item><item><title>Team Build Object Model - Queueing a Build</title><link>http://blogs.msdn.com/aaronhallberg/archive/2007/04/24/team-build-object-model-queueing-a-build.aspx</link><pubDate>Tue, 24 Apr 2007 17:55:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2260934</guid><dc:creator>aaronhallberg</dc:creator><slash:comments>7</slash:comments><comments>http://blogs.msdn.com/aaronhallberg/comments/2260934.aspx</comments><wfw:commentRss>http://blogs.msdn.com/aaronhallberg/commentrss.aspx?PostID=2260934</wfw:commentRss><description>&lt;P&gt;Two of the biggest Team Build changes in Orcas (Beta 1 is now available &lt;A href="http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx" target=_blank mce_href="http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx"&gt;here&lt;/A&gt;) are (a) the addition of an Object Model, and (b) the addition of build queueing.&amp;nbsp; In Team Build v1, by contrast, the only API available for Team Build was the web service; and only a single build (per Team Project per Build Machine) could be executed at a time - subsequent build start requests just failed.&lt;/P&gt;
&lt;P&gt;The basic process for queueing a build is illustrated in the following sample:&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;using&lt;/SPAN&gt; System;
&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;using&lt;/SPAN&gt; Microsoft.TeamFoundation.Client;
&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;using&lt;/SPAN&gt; Microsoft.TeamFoundation.Build.Client;

&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;namespace&lt;/SPAN&gt; OrcasBlogProjects
{
    &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;class&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;Program
&lt;/SPAN&gt;    {
        &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;void&lt;/SPAN&gt; Main(&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;string&lt;/SPAN&gt;[] args)
        {
            &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;IQueuedBuild&lt;/SPAN&gt; queuedBuild = QueueBuild(&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;"http://tfs:8080"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: rgb(163,21,21)"&gt;"Team Project"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: rgb(163,21,21)"&gt;"Nightly Build"&lt;/SPAN&gt;);

            &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;Console&lt;/SPAN&gt;.WriteLine(&lt;SPAN style="COLOR: rgb(43,145,175)"&gt;String&lt;/SPAN&gt;.Format(&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;"Build successfully queued. Position: {0}."&lt;/SPAN&gt;, queuedBuild.QueuePosition));
        }

        &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;IQueuedBuild&lt;/SPAN&gt; QueueBuild(&lt;SPAN style="COLOR: rgb(43,145,175)"&gt;String&lt;/SPAN&gt; tfs, &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;String&lt;/SPAN&gt; teamProject, &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;String&lt;/SPAN&gt; buildDefinition)
        {
            &lt;SPAN style="COLOR: rgb(0,128,0)"&gt;// Get the specified team foundation server.
&lt;/SPAN&gt;            &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;TeamFoundationServer&lt;/SPAN&gt; tfs = &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;TeamFoundationServerFactory&lt;/SPAN&gt;.GetServer(tfs);

            &lt;SPAN style="COLOR: rgb(0,128,0)"&gt;// Get the IBuildServer - the main point of entry to the Team Build OM.
&lt;/SPAN&gt;            &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;IBuildServer&lt;/SPAN&gt; buildServer = (&lt;SPAN style="COLOR: rgb(43,145,175)"&gt;IBuildServer&lt;/SPAN&gt;)tfs.GetService(&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;typeof&lt;/SPAN&gt;(&lt;SPAN style="COLOR: rgb(43,145,175)"&gt;IBuildServer&lt;/SPAN&gt;));

            &lt;SPAN style="COLOR: rgb(0,128,0)"&gt;// Get the build definition for which a build is to be queued.
&lt;/SPAN&gt;            &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;IBuildDefinition&lt;/SPAN&gt; definition = buildServer.GetBuildDefinition(teamProject, buildDefinition);

            &lt;SPAN style="COLOR: rgb(0,128,0)"&gt;// Create a build request for the build definition.
&lt;/SPAN&gt;            &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;IBuildRequest&lt;/SPAN&gt; request = definition.CreateBuildRequest();

            &lt;SPAN style="COLOR: rgb(0,128,0)"&gt;// Queue a build.
&lt;/SPAN&gt;            &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;return&lt;/SPAN&gt; buildServer.QueueBuild(request, &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;QueueOptions&lt;/SPAN&gt;.None);
        }
    }
}&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;Note the major steps in this process - (1) get the build definition, (2) create a request, and (3) queue the build.&amp;nbsp; An overload of QueueBuild will be available in Beta 2 that takes a definition directly - when using all default options (see below for more on this), this overload can be used.&lt;/P&gt;
&lt;P&gt;Step (1) is fairly straightforward, but even here there are various options available.&amp;nbsp; The example illustrates obtaining a build definition from the Team Project name and the Definition name.&amp;nbsp; Another overload of the &lt;EM&gt;GetBuildDefinition&lt;/EM&gt; method takes a build definition URI:&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;IBuildDefinition&lt;/SPAN&gt; GetBuildDefinition(
    &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;Uri&lt;/SPAN&gt; buildDefinitionUri
)&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;In addition to the two &lt;EM&gt;Get&lt;/EM&gt; methods, several &lt;EM&gt;Query&lt;/EM&gt; methods are also available for build definitions.&amp;nbsp; The most interesting for these purposes is the following:&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;IBuildDefinitionQueryResult&lt;/SPAN&gt; QueryBuildDefinitions(
    &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;IBuildDefinitionSpec&lt;/SPAN&gt; buildDefinitionSpec
)&lt;/PRE&gt;
&lt;P&gt;The returned &lt;EM&gt;IBuildDefinitionQueryResult&lt;/EM&gt; contains an array of matched definitions, and an array of Failures, if any occurred.&amp;nbsp; The input &lt;EM&gt;IBuildDefinitionSpec&lt;/EM&gt; allows wildcards in its &lt;EM&gt;Name&lt;/EM&gt; property, which allows you to probe a particular team project for build definitions.&lt;/P&gt;
&lt;P&gt;Step (2) offers many opportunities for customization.&amp;nbsp; In particular, the &lt;EM&gt;IBuildRequest&lt;/EM&gt; interface allows you to update many of the defaults for the requested build prior to queueing it.&amp;nbsp; Settable properties include:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The build agent&amp;nbsp;for which the requested build is queued.&amp;nbsp; Build Agents are a new concept in Orcas, but can be thought of as v1 build machines.&lt;/LI&gt;
&lt;LI&gt;The version for which sources are retrieved for the build.&lt;/LI&gt;
&lt;LI&gt;The drop location to which binaries and log files are copied when the build is complete.&lt;/LI&gt;
&lt;LI&gt;The priority of the requested build.&amp;nbsp; Queue priorities are used in combination with queue times to determine which build should be started on an idle agent when multiple builds are in the queue.&lt;/LI&gt;
&lt;LI&gt;The user for whom the build is being requested.&lt;/LI&gt;
&lt;LI&gt;The maximum acceptable queue position - if this position cannot be satisfied, an exception will be thrown.&lt;/LI&gt;
&lt;LI&gt;Last, but certainly not least, any command-line arguments which should be passed into MSBuild for the requested build.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Contrast this with the properties settable when starting a build in v1 - just the build machine and the build directory.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Beta 1 does not have a go-live license, but I hope that various folks out there will start downloading the VPCs and experimenting with the new Team Build Object Model - we'd love to get your feedback on it as soon as possible!&amp;nbsp; &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2260934" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/aaronhallberg/archive/tags/Team+Build+Orcas/default.aspx">Team Build Orcas</category></item><item><title>Adding Build Steps to Team Build in orcas</title><link>http://blogs.msdn.com/aaronhallberg/archive/2007/03/28/adding-build-steps-to-team-build-in-orcas.aspx</link><pubDate>Wed, 28 Mar 2007 18:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1976950</guid><dc:creator>aaronhallberg</dc:creator><slash:comments>9</slash:comments><comments>http://blogs.msdn.com/aaronhallberg/comments/1976950.aspx</comments><wfw:commentRss>http://blogs.msdn.com/aaronhallberg/commentrss.aspx?PostID=1976950</wfw:commentRss><description>&lt;P&gt;Way back in August I did a &lt;A href="http://blogs.msdn.com/aaronhallberg/archive/2006/08/29/730447.aspx" mce_href="http://blogs.msdn.com/aaronhallberg/archive/2006/08/29/730447.aspx"&gt;post&lt;/A&gt;&amp;nbsp;(my 2nd ever!) on adding build steps to Team Build using a custom task.&amp;nbsp; I thought I would revisit this topic in the context of the latest version of Team Build, now available in the &lt;A href="http://blogs.msdn.com/buckh/archive/2007/02/28/orcas-march-ctp-is-available-now-and-includes-new-team-foundation-server.aspx" mce_href="http://blogs.msdn.com/buckh/archive/2007/02/28/orcas-march-ctp-is-available-now-and-includes-new-team-foundation-server.aspx"&gt;March CTP&lt;/A&gt; of Orcas. &lt;/P&gt;
&lt;P&gt;In Orcas, you'll have two options for adding build steps - the built-in &lt;EM&gt;BuildStep&lt;/EM&gt; task, or your own custom task using the brand new Team Build Object Model (OM).&amp;nbsp; &lt;/P&gt;
&lt;P&gt;The BuildStep task can be used in two distinct ways: you can &lt;EM&gt;add&lt;/EM&gt; build steps and you can &lt;EM&gt;update&lt;/EM&gt; build steps:&amp;nbsp; &lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Target&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;DoStuff&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;

    &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;BuildStep&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;TeamFoundationServerUrl&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;$(TeamFoundationServerUrl)&lt;/SPAN&gt;"
&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;               &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;BuildUri&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;$(BuildUri)&lt;/SPAN&gt;"
&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;               &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Message&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;Doing some stuff...&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
      &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Output&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;TaskParameter&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;Id&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;PropertyName&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;StepId&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; /&amp;gt;
    &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;BuildStep&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;

    &amp;lt;!--&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; Do some stuff here... &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;--&amp;gt;

    &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;BuildStep&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;TeamFoundationServerUrl&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;$(TeamFoundationServerUrl)&lt;/SPAN&gt;"
&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;               &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;BuildUri&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;$(BuildUri)&lt;/SPAN&gt;"
&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;               &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;$(StepId)&lt;/SPAN&gt;"
&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;               &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Status&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;Succeeded&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; /&amp;gt;

    &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;OnError&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;ExecuteTargets&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;MarkBuildStepAsFailed&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; /&amp;gt;
    
  &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Target&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;

  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Target&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;MarkBuildStepAsFailed&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
    
    &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;BuildStep&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;TeamFoundationServerUrl&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;$(TeamFoundationServerUrl)&lt;/SPAN&gt;"
&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;               &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;BuildUri&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;$(BuildUri)&lt;/SPAN&gt;"
&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;               &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;$(StepId)&lt;/SPAN&gt;"
&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;               &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Status&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;Failed&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; /&amp;gt;
    
  &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Target&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;In this example, a build step is added, some stuff happens, and the build step is updated.&amp;nbsp; Note the error handling which marks the step as Failed when an error occurs in the &lt;EM&gt;DoStuff&lt;/EM&gt; target.&lt;/P&gt;
&lt;P&gt;If you don't have any &lt;EM&gt;stuff&lt;/EM&gt; to do, and just want to add an informational build step, you can ignore the ID output property and set the Status immediately when you add the build step.&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;    &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;BuildStep&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;TeamFoundationServerUrl&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;$(TeamFoundationServerUrl)&lt;/SPAN&gt;"
&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;               &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;BuildUri&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;$(BuildUri)&lt;/SPAN&gt;"
&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;               &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Message&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;This is an informational message.&lt;/SPAN&gt;"
&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;               &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Status&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;Succeeded&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; /&amp;gt;
&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;And that's it!&amp;nbsp; &lt;/P&gt;
&lt;P&gt;There are still situations where you'll want to add build steps using your own custom tasks, of course.&amp;nbsp; In this case, you can use the new OM, which should be a bit simpler than using the old web service methods.&amp;nbsp; &lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;using&lt;/SPAN&gt; System;
&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;using&lt;/SPAN&gt; Microsoft.Build.Framework;
&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;using&lt;/SPAN&gt; Microsoft.TeamFoundation.Client;
&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;using&lt;/SPAN&gt; Microsoft.TeamFoundation.Build.Client;

&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;namespace&lt;/SPAN&gt; CustomTasks
{
    &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;abstract&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;class&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;TeamBuildTask&lt;/SPAN&gt; : &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;ITask
&lt;/SPAN&gt;    {
        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,128,128)"&gt;&amp;lt;summary&amp;gt;
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; Put real task logic in this method.
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,128,128)"&gt;&amp;lt;/summary&amp;gt;
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,128,128)"&gt;&amp;lt;returns&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt;True if task is successful, otherwise false.&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,128,128)"&gt;&amp;lt;/returns&amp;gt;
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;protected&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;abstract&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;bool&lt;/SPAN&gt; ExecuteInternal();

        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,128,128)"&gt;&amp;lt;summary&amp;gt;
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; Returns the name of the build step to be added for this task.
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,128,128)"&gt;&amp;lt;/summary&amp;gt;
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,128,128)"&gt;&amp;lt;returns&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt;Name of the build step to be added.&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,128,128)"&gt;&amp;lt;/returns&amp;gt;
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;protected&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;abstract&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;string&lt;/SPAN&gt; GetBuildStepName();

        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,128,128)"&gt;&amp;lt;summary&amp;gt;
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; Returns the message of the build step to be added for this task - this is the
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; string displayed in the Team Build GUI.
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,128,128)"&gt;&amp;lt;/summary&amp;gt;
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,128,128)"&gt;&amp;lt;returns&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt;Message of the build step to be added.&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,128,128)"&gt;&amp;lt;/returns&amp;gt;
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;protected&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;abstract&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;string&lt;/SPAN&gt; GetBuildStepMessage();

        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,128,128)"&gt;&amp;lt;summary&amp;gt;
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; ITask implementation - BuildEngine property.
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,128,128)"&gt;&amp;lt;/summary&amp;gt;
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;IBuildEngine&lt;/SPAN&gt; BuildEngine
        {
            &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;get
&lt;/SPAN&gt;            {
                &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;return&lt;/SPAN&gt; m_buildEngine;
            }
            &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;set
&lt;/SPAN&gt;            {
                m_buildEngine = &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;value&lt;/SPAN&gt;;
            }
        }

        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,128,128)"&gt;&amp;lt;summary&amp;gt;
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; ITask implementation - HostObject property.
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,128,128)"&gt;&amp;lt;/summary&amp;gt;
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;ITaskHost&lt;/SPAN&gt; HostObject
        {
            &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;get
&lt;/SPAN&gt;            {
                &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;return&lt;/SPAN&gt; m_hostObject;
            }
            &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;set
&lt;/SPAN&gt;            {
                m_hostObject = &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;value&lt;/SPAN&gt;;
            }
        }

        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,128,128)"&gt;&amp;lt;summary&amp;gt;
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; The Url of the Team Foundation Server.
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,128,128)"&gt;&amp;lt;/summary&amp;gt;
&lt;/SPAN&gt;        [&lt;SPAN style="COLOR: rgb(43,145,175)"&gt;Required&lt;/SPAN&gt;]
        &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;string&lt;/SPAN&gt; TeamFoundationServerUrl
        {
            &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;get
&lt;/SPAN&gt;            {
                &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;return&lt;/SPAN&gt; m_tfsUrl;
            }
            &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;set
&lt;/SPAN&gt;            {
                m_tfsUrl = &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;value&lt;/SPAN&gt;;
            }
        }

        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,128,128)"&gt;&amp;lt;summary&amp;gt;
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; The Uri of the Build for which this task is executing.
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,128,128)"&gt;&amp;lt;/summary&amp;gt;
&lt;/SPAN&gt;        [&lt;SPAN style="COLOR: rgb(43,145,175)"&gt;Required&lt;/SPAN&gt;]
        &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;string&lt;/SPAN&gt; BuildUri
        {
            &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;get
&lt;/SPAN&gt;            {
                &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;return&lt;/SPAN&gt; m_buildUri;
            }
            &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;set
&lt;/SPAN&gt;            {
                m_buildUri = &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;value&lt;/SPAN&gt;;
            }
        }

        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,128,128)"&gt;&amp;lt;summary&amp;gt;
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; Lazy init property that gives access to the TF Server specified by TeamFoundationServerUrl.
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,128,128)"&gt;&amp;lt;/summary&amp;gt;
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;protected&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;TeamFoundationServer&lt;/SPAN&gt; Tfs
        {
            &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;get
&lt;/SPAN&gt;            {
                &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;if&lt;/SPAN&gt; (m_tfs == &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;null&lt;/SPAN&gt;)
                {
                    &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;if&lt;/SPAN&gt; (&lt;SPAN style="COLOR: rgb(43,145,175)"&gt;String&lt;/SPAN&gt;.IsNullOrEmpty(TeamFoundationServerUrl))
                    {
                        &lt;SPAN style="COLOR: rgb(0,128,0)"&gt;// Throw some exception.
&lt;/SPAN&gt;                    }
                    m_tfs = &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;TeamFoundationServerFactory&lt;/SPAN&gt;.GetServer(TeamFoundationServerUrl);
                }
                &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;return&lt;/SPAN&gt; m_tfs;
            }
        }

        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,128,128)"&gt;&amp;lt;summary&amp;gt;
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; Lazy init property that gives access to the BuildServer service of the TF Server.
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,128,128)"&gt;&amp;lt;/summary&amp;gt;
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;protected&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;IBuildServer&lt;/SPAN&gt; BuildServer
        {
            &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;get
&lt;/SPAN&gt;            {
                &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;if&lt;/SPAN&gt; (m_buildServer == &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;null&lt;/SPAN&gt;)
                {
                    m_buildServer = (&lt;SPAN style="COLOR: rgb(43,145,175)"&gt;IBuildServer&lt;/SPAN&gt;)Tfs.GetService(&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;typeof&lt;/SPAN&gt;(&lt;SPAN style="COLOR: rgb(43,145,175)"&gt;IBuildServer&lt;/SPAN&gt;));
                }
                &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;return&lt;/SPAN&gt; m_buildServer;
            }
        }

        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,128,128)"&gt;&amp;lt;summary&amp;gt;
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; Lazy init property that gives access to the Build specified by BuildUri.
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,128,128)"&gt;&amp;lt;/summary&amp;gt;
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;protected&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;IBuildDetail&lt;/SPAN&gt; Build
        {
            &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;get
&lt;/SPAN&gt;            {
                &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;if&lt;/SPAN&gt; (m_build == &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;null&lt;/SPAN&gt;)
                {
                    m_build = (&lt;SPAN style="COLOR: rgb(43,145,175)"&gt;IBuildDetail&lt;/SPAN&gt;)BuildServer.GetBuild(&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;Uri&lt;/SPAN&gt;(BuildUri), &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;null&lt;/SPAN&gt;, &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;QueryOptions&lt;/SPAN&gt;.None);
                }
                &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;return&lt;/SPAN&gt; m_build;
            }
        }

        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,128,128)"&gt;&amp;lt;summary&amp;gt;
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; ITask implementation - Execute method.
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,128,128)"&gt;&amp;lt;/summary&amp;gt;
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,128,128)"&gt;&amp;lt;returns&amp;gt;
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; True if the task succeeded, false otherwise.
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(128,128,128)"&gt;///&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,128,128)"&gt;&amp;lt;/returns&amp;gt;
&lt;/SPAN&gt;        &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;bool&lt;/SPAN&gt; Execute()
        {
            &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;bool&lt;/SPAN&gt; returnValue = &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;false&lt;/SPAN&gt;;

            &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;try
&lt;/SPAN&gt;            {
                AddBuildStep();
                returnValue = ExecuteInternal();
            }
            &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;catch&lt;/SPAN&gt; (&lt;SPAN style="COLOR: rgb(43,145,175)"&gt;Exception&lt;/SPAN&gt; e)
            {
                AddExceptionBuildStep(e);
                &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;throw&lt;/SPAN&gt;;
            }
            &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;finally
&lt;/SPAN&gt;            {
                UpdateBuildStep(returnValue);
            }

            &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;return&lt;/SPAN&gt; returnValue;
        }

        &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;void&lt;/SPAN&gt; AddBuildStep()
        {
            m_buildStep = &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;InformationNodeConverters&lt;/SPAN&gt;.AddBuildStep(Build, GetBuildStepName(), GetBuildStepMessage());
        }

        &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;void&lt;/SPAN&gt; UpdateBuildStep(&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;bool&lt;/SPAN&gt; result)
        {
            m_buildStep.Status = result ? &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;BuildStepStatus&lt;/SPAN&gt;.Succeeded : &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;BuildStepStatus&lt;/SPAN&gt;.Failed;
            m_buildStep.FinishTime = &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;DateTime&lt;/SPAN&gt;.Now;
            m_buildStep.Save();
        }

        &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;void&lt;/SPAN&gt; AddExceptionBuildStep(&lt;SPAN style="COLOR: rgb(43,145,175)"&gt;Exception&lt;/SPAN&gt; e)
        {
            &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;try
&lt;/SPAN&gt;            {
                &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;IBuildStep&lt;/SPAN&gt; buildStep = &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;InformationNodeConverters&lt;/SPAN&gt;.AddBuildStep(Build, &lt;SPAN style="COLOR: rgb(163,21,21)"&gt;"Exception"&lt;/SPAN&gt;, e.Message, &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;DateTime&lt;/SPAN&gt;.Now, &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;BuildStepStatus&lt;/SPAN&gt;.Failed);
            }
            &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;catch
&lt;/SPAN&gt;            {
                &lt;SPAN style="COLOR: rgb(0,128,0)"&gt;// Eat any exceptions.
&lt;/SPAN&gt;            }
        }

        &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;IBuildEngine&lt;/SPAN&gt; m_buildEngine;
        &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;ITaskHost&lt;/SPAN&gt; m_hostObject;
        &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;string&lt;/SPAN&gt; m_tfsUrl;
        &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;string&lt;/SPAN&gt; m_buildUri;
        &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;TeamFoundationServer&lt;/SPAN&gt; m_tfs;
        &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;IBuildServer&lt;/SPAN&gt; m_buildServer;
        &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;IBuildDetail&lt;/SPAN&gt; m_build;
        &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;private&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;IBuildStep&lt;/SPAN&gt; m_buildStep;
    }
}&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;There are a few things here which require some explanation.&amp;nbsp; &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;IBuildServer.&lt;/LI&gt;&lt;/UL&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;IBuildServer is the top-level interface in the OM.&amp;nbsp; It exposes methods for getting/querying builds, build definitions (formerly known as build types), build agents (formerly non-existent), etc.&amp;nbsp; &lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;UL&gt;
&lt;LI&gt;IBuildDetail.&lt;/LI&gt;&lt;/UL&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;IBuildDetail represents an individual build in the OM.&amp;nbsp; It exposes methods such as Stop and Delete; properties such as StartTime and RequestedBy; and events (which support polling for changes) such as StatusChanging and PollingCompleted.&amp;nbsp; It also exposes a tree of arbitrary build information nodes which are used to store all standard Team Build data and can also be used to add any arbitrary custom data.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;UL&gt;
&lt;LI&gt;InformationNodeConverters and IBuildStep.&lt;/LI&gt;&lt;/UL&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;The InformationNodeConverters class can be used to get (and add) standard Team Build data types from the generic build information nodes associated with a build.&amp;nbsp; Each well-known data type is exposed as an interface - build steps are exposed via IBuildStep.&amp;nbsp; &lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I'll go into more details on&amp;nbsp;the&amp;nbsp;OM in later posts&amp;nbsp;- hopefully this will be enough info to get those of you playing around with the March CTP started and to get those of you &lt;EM&gt;not&lt;/EM&gt; playing around with the CTP interested in doing so!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1976950" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/aaronhallberg/archive/tags/MSBuild/default.aspx">MSBuild</category><category domain="http://blogs.msdn.com/aaronhallberg/archive/tags/Team+Build+Orcas/default.aspx">Team Build Orcas</category></item><item><title>Orcas Changes</title><link>http://blogs.msdn.com/aaronhallberg/archive/2007/03/21/orcas-changes.aspx</link><pubDate>Wed, 21 Mar 2007 16:46:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1925664</guid><dc:creator>aaronhallberg</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/aaronhallberg/comments/1925664.aspx</comments><wfw:commentRss>http://blogs.msdn.com/aaronhallberg/commentrss.aspx?PostID=1925664</wfw:commentRss><description>&lt;P&gt;The March CTP of Orcas is now available (Buck has a post on this &lt;A href="http://blogs.msdn.com/buckh/archive/2007/02/28/orcas-march-ctp-is-available-now-and-includes-new-team-foundation-server.aspx" mce_href="http://blogs.msdn.com/buckh/archive/2007/02/28/orcas-march-ctp-is-available-now-and-includes-new-team-foundation-server.aspx"&gt;here&lt;/A&gt;), and with it comes your first chance to play around with the new and improved Team Build.&amp;nbsp; I'm pretty excited about the changes in the build process (defined in Microsoft.TeamFoundation.Build.targets), so I figured I'd mention some of them:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;We've added hooks (targets which can be overridden) to allow executing custom logic before/after the compilation of individual configurations (BeforeCompileConfiguration and AfterCompileConfiguration, respectively) and before/after the compilation of individual solutions (BeforeCompileSolution and AfterCompileSolution, respectively).&amp;nbsp; In V1 the only available hook was before/after &lt;EM&gt;everything&lt;/EM&gt; was compiled (BeforeCompile and AfterComile, respectively) - these targets are still available as well.&amp;nbsp; &lt;/LI&gt;
&lt;LI&gt;We've added the ability to pass custom properties into your solutions when they are built.&amp;nbsp; This can be done either for &lt;EM&gt;every&lt;/EM&gt; solution, using the $(CustomPropertiesForBuild) property; or for &lt;EM&gt;individual&lt;/EM&gt; solutions, using the &lt;EM&gt;Properties&lt;/EM&gt; metadata in the &lt;EM&gt;SolutionToBuild&lt;/EM&gt; item group.&lt;/LI&gt;
&lt;LI&gt;We've added "convenience" properties for doing incremental gets and incremental builds, called (strangely enough) $(IncrementalGet) and $(IncrementalBuild).&amp;nbsp; Setting them to true will make all the changes necessary to do an incremental get or build, respectively.&amp;nbsp; In V1, it was not possible to make a distinction between these two choices, since the Clean target wiped out all sources, rather than just deleting binaries.&lt;/LI&gt;
&lt;LI&gt;We've added the ability to retrieve the list of files &lt;EM&gt;gotten&lt;/EM&gt;, &lt;EM&gt;replaced&lt;/EM&gt; and &lt;EM&gt;deleted&lt;/EM&gt; by the Get task.&amp;nbsp; Just set the $(GetPopulateOutput) property to true, and three item groups named Gets, Replaces, and Deletes will be populated when the Get task executes.&lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;All&lt;/EM&gt; the properties of the build will now be available to the build script, thanks to the inclusion of a new task called &lt;EM&gt;GetBuildProperties&lt;/EM&gt;, which is executed right at the beginning of the build process.&amp;nbsp; &lt;/LI&gt;
&lt;LI&gt;All the settable&amp;nbsp;properties of the build can now be set at any point using another new task called &lt;EM&gt;SetBuildProperties&lt;/EM&gt;.&lt;/LI&gt;
&lt;LI&gt;A final new task, called &lt;EM&gt;BuildStep&lt;/EM&gt;, can be used to insert and update build steps during the course of the build without having to write a custom task.&amp;nbsp; &lt;/LI&gt;
&lt;LI&gt;Output directories can be customized for individual solutions and even for individual projects within your solutions.&amp;nbsp; I'll do another post at some point illustrating this in greater depth.&lt;/LI&gt;
&lt;LI&gt;For you VC++ developers, we've provided "pass-through" properties for all the VCBuild task properties, including: $(VCBuildAdditionalLibPaths), $(VCBuildAdditionalOptions), $(VCBuildToolPath), and $(VCBuildUseEnvironment).&amp;nbsp; Hopefully this will allow folks to accomplish what they need with&amp;nbsp;VCBuild without having to specify everything as crazy escaped XML in the $(AdditionalVCOverrides) property!&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;There are &lt;EM&gt;lots&lt;/EM&gt; of other changes as well (including Continuous Integration support, scheduled builds, build queueing, an Object Model, etc.), but these are the MSBuild-related highlights.&amp;nbsp; We're really excited about this new version and look forward to getting your feedback on it!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1925664" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/aaronhallberg/archive/tags/Team+Build+Orcas/default.aspx">Team Build Orcas</category></item></channel></rss>