<?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>Team Build Object Model - Queueing a Build</title><link>http://blogs.msdn.com/b/aaronhallberg/archive/2007/04/24/team-build-object-model-queueing-a-build.aspx</link><description>Two of the biggest Team Build changes in Orcas (Beta 1 is now available here ) are (a) the addition of an Object Model, and (b) the addition of build queueing. In Team Build v1, by contrast, the only API available for Team Build was the web service; and</description><dc:language>en</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Team Build Object Model - Queueing a Build</title><link>http://blogs.msdn.com/b/aaronhallberg/archive/2007/04/24/team-build-object-model-queueing-a-build.aspx#9255822</link><pubDate>Mon, 29 Dec 2008 19:23:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9255822</guid><dc:creator>aaronhallberg</dc:creator><description>&lt;p&gt;The new version would involve querying for queued builds on the relevant agent. &amp;nbsp;As of SP1, you should be able to do something like:&lt;/p&gt;
&lt;p&gt;IQueuedBuildSpec spec = BuildServer.CreateBuildQueueSpec(&amp;quot;TeamProject&amp;quot;);&lt;/p&gt;
&lt;p&gt;spec.AgentSpec.Name = &amp;quot;DesiredAgentName&amp;quot;;&lt;/p&gt;
&lt;p&gt;spec.Status = QueueStatus.InProgress;&lt;/p&gt;
&lt;p&gt;IQueuedBuildQueryResult queryResult = BuildServer.QueryQueuedBuilds(spec);&lt;/p&gt;
&lt;p&gt;This assumes that you've already retrieved an IBuildServer into the BuildServer variable, that your Team Project is called &amp;quot;TeamProject&amp;quot;, and that the agent you are interested in is named &amp;quot;DesiredAgentName&amp;quot;. &amp;nbsp;You can inspect the Builds property of the query result to determine whether there were any in progress builds on the agent.&lt;/p&gt;
&lt;p&gt;For RTM it is a bit more complicated, since we didn't expose the QueryQueuedBuilds method directly in the OM. &amp;nbsp;Instead, you would need to create an IQueuedBuildsView, set the appropriate filters on it, call Refresh, and then inspect the contents of the queue.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9255822" width="1" height="1"&gt;</description></item><item><title>re: Team Build Object Model - Queueing a Build</title><link>http://blogs.msdn.com/b/aaronhallberg/archive/2007/04/24/team-build-object-model-queueing-a-build.aspx#9253684</link><pubDate>Fri, 26 Dec 2008 19:49:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9253684</guid><dc:creator>Juzzzt</dc:creator><description>&lt;p&gt;I had only one problem with new TFS 2008 API. I couldn't get if build server process some build at the moment or not. Previous version had mechanism like:&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string uri = string.Format(&amp;quot;tcp://{0}:{1}/{2}&amp;quot;, server, &amp;quot;9191&amp;quot;, typeof(Microsoft.TeamFoundation.Build.Common.IBuildAgent).FullName);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Microsoft.TeamFoundation.Build.Common.IBuildAgent agent = (Microsoft.TeamFoundation.Build.Common.IBuildAgent)Activator.GetObject(&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;typeof(Microsoft.TeamFoundation.Build.Common.IBuildAgent), uri);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (agent.Status == AgentStatus.Initializing)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return &amp;quot;InProgress&amp;quot;;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return &amp;quot;NotRunning&amp;quot;;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;Don't you know it's new implementation?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9253684" width="1" height="1"&gt;</description></item><item><title>New Team foundation Server build API documentation for Team Foundation Server 2008</title><link>http://blogs.msdn.com/b/aaronhallberg/archive/2007/04/24/team-build-object-model-queueing-a-build.aspx#7785582</link><pubDate>Tue, 19 Feb 2008 06:08:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7785582</guid><dc:creator>Noticias externas</dc:creator><description>&lt;p&gt;At code camp i mentioned build as one of the areas in TeamSystem with the most enhancements was Build&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7785582" width="1" height="1"&gt;</description></item><item><title>New Team foundation Server build API documentation for Team Foundation Server 2008</title><link>http://blogs.msdn.com/b/aaronhallberg/archive/2007/04/24/team-build-object-model-queueing-a-build.aspx#7784912</link><pubDate>Tue, 19 Feb 2008 05:06:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7784912</guid><dc:creator>Ozzie Rules Blogging </dc:creator><description>&lt;p&gt;At code camp i mentioned build as one of the areas in TeamSystem with the most enhancements was Build-&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7784912" width="1" height="1"&gt;</description></item><item><title>Team Foundation Build 2008 API documentation</title><link>http://blogs.msdn.com/b/aaronhallberg/archive/2007/04/24/team-build-object-model-queueing-a-build.aspx#7675733</link><pubDate>Wed, 13 Feb 2008 17:55:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7675733</guid><dc:creator>Buck Hodges</dc:creator><description>&lt;p&gt;The documentation for the team build 2008 object model is now available as a CHM file. Later this year,&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7675733" width="1" height="1"&gt;</description></item><item><title>VSTS Links - 04/27/2007</title><link>http://blogs.msdn.com/b/aaronhallberg/archive/2007/04/24/team-build-object-model-queueing-a-build.aspx#2299419</link><pubDate>Fri, 27 Apr 2007 16:00:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2299419</guid><dc:creator>Team System News</dc:creator><description>&lt;p&gt;Notion Solutions announces eTraining for Team System. Kannan on TFS Reporting Simplified. Brian Harry...&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2299419" width="1" height="1"&gt;</description></item><item><title>Queuing a build in PowerShell</title><link>http://blogs.msdn.com/b/aaronhallberg/archive/2007/04/24/team-build-object-model-queueing-a-build.aspx#2272807</link><pubDate>Wed, 25 Apr 2007 17:41:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2272807</guid><dc:creator>Jason Prickett's Blog</dc:creator><description>&lt;p&gt;I just read Aaron's post &amp;quot;Team Build Object Model - Queueing a Build&amp;quot; and I just had convert his code&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2272807" width="1" height="1"&gt;</description></item></channel></rss>