<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sid Forcier&#039;s Dev Blog</title>
	<atom:link href="http://sidneyforcier.com/wordpress/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://sidneyforcier.com/wordpress</link>
	<description>Just another Dev Blog</description>
	<lastBuildDate>Tue, 05 Apr 2011 01:57:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Continuous integration using Team Build 2010 and SVN</title>
		<link>http://sidneyforcier.com/wordpress/?p=118</link>
		<comments>http://sidneyforcier.com/wordpress/?p=118#comments</comments>
		<pubDate>Wed, 19 Jan 2011 23:18:53 +0000</pubDate>
		<dc:creator>sforcier</dc:creator>
				<category><![CDATA[TFS 2010]]></category>
		<category><![CDATA[Team Build 2010]]></category>

		<guid isPermaLink="false">http://sidneyforcier.com/wordpress/?p=118</guid>
		<description><![CDATA[I recently had this problem... We have a multi-project solution that includes not just software, but also hardware and firmware. We'd like to use TFS 2010 as the system of record for everything, and perhaps even have it build the firmware. The difficulty is that the firmware product is built by a Linux server, the [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had this problem...</p>
<p>We have a multi-project solution that includes not just software, but also hardware and firmware. We'd like to use TFS 2010 as the system of record for everything, and perhaps even have it build the firmware. The difficulty is that the firmware product is built by a Linux server, the team has been using SVN for a long time, and it's not really an option to change their workflow *at all*.</p>
<p>I managed to get a build working in Linux pretty easily using Putty (which is another topic for discussion). Once the build was in place it was a matter of integrating with SVN to cause the build to be kicked off upon checkin.</p>
<p>The rough sketch of my approach was this:</p>
<ol>
<li>Create a web application with one page "BuildStarter.aspx" which accepted one querystring variable "bid"</li>
<li>Make that page kick off a build with a build name that matches the querystring variable "bid"</li>
<li>Add a post-commit hook into SVN which performs a wget to "BuildStarter.aspx?bid=[BuildName]"</li>
</ol>
<p>If I get around to it, I'll post the code for the implementation of kicking off a build from the querystring variable, but for now I'll leave that to you. If you've never written anything that uses the Team Build assemblies, Google should prove useful.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-1651361775697909";
/* 468x60, created 1/19/11 */
google_ad_slot = "4010823669";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://sidneyforcier.com/wordpress/?feed=rss2&amp;p=118</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Team Build 2010: Reference Hint Paths &#8211; Part 2 (No Assembly Required)</title>
		<link>http://sidneyforcier.com/wordpress/?p=45</link>
		<comments>http://sidneyforcier.com/wordpress/?p=45#comments</comments>
		<pubDate>Fri, 05 Nov 2010 00:26:23 +0000</pubDate>
		<dc:creator>sforcier</dc:creator>
				<category><![CDATA[TFS 2010]]></category>
		<category><![CDATA[Team Build 2010]]></category>

		<guid isPermaLink="false">http://sidneyforcier.com/wordpress/?p=45</guid>
		<description><![CDATA[In Part 1 I mentioned the MSBuild Arguments build definition parameter and how you can use it to give MSBuild some hints on where/how to resolve references. The problem was that it doesn't support relative pathing. Let's work around that by modifying the build process template to support using the source control path. Check the [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://sidneyforcier.com/wordpress/?p=41">Part 1</a> I mentioned the <strong>MSBuild Arguments</strong> build definition parameter and how you can use it to give MSBuild some hints on where/how to resolve references. The problem was that it doesn't support relative pathing. Let's work around that by modifying the build process template to support using the source control path.</p>
<h3>Check the reference assemblies into source control</h3>
<p>Checking third party assemblies into source control is generally a good idea. In fact, by simply checking your assemblies into source control and updating the references in your projects to use this location you may even resolve your issue.</p>
<h3>Add an argument to your build template</h3>
<div class="scfNote"><img title="Note" src="http://sidneyforcier.com/wordpress/wp-content/uploads/2010/11/Note.gif" alt="" width="44" height="14" /><br />
I assume you know how to modify a build process template and are familiar with adding variables and arguments. If you're not <a href="http://www.ewaldhofman.nl/post/2010/04/27/Customize-Team-Build-2010-e28093-Part-2-Add-arguments-and-variables.aspx">read this first</a>.</div>
<ol>
<li>Add an argument <strong>ServerReferencePath</strong> which is an array of strings to hold all the source control paths you'd like to use as reference hint paths.</li>
<li>Use the <strong>Metadata </strong>property to expose the argument to the end user.<br />
<img class="alignnone size-full wp-image-88" title="ServerReferencePath2" src="http://sidneyforcier.com/wordpress/wp-content/uploads/2010/11/ServerReferencePath2.png" alt="" width="682" height="652" /></li>
</ol>
<h3>Build the command line argument</h3>
<p>You can do this however you want, but the idea is to build a command line parameter similar to:</p>
<p>/p:ReferencePath="c:\BuildAgentPath\foo\x;c:\BuildAgentPath\bar\y"</p>
<p>and append it to the <strong>MSBuildArguments</strong> argument. You must do this after the workspace has been created because this approach uses source control and the workspace.</p>
<ol>
<li>In, or after, the <strong>Initialize Workspace </strong>sequence,  add an <strong>Assign </strong>activity.</li>
<li>Set the left side to <strong>MSBuildArguments</strong>.</li>
<li>Set the right side to:<span style="font-family: Consolas; font-size: x-small;">If(ServerReferencePath.Length &gt; 0, _<br />
   MSBuildArguments + _<br />
   String.Format(" /p:ReferencePath=""{0}""", _<br />
      String.Join(";", _<br />
         ServerReferencePath.Select(Function(s) Workspace.GetLocalItemForServerItem(s)))), _<br />
   MSBuildArguments)<br />
</span></li>
</ol>
<p>This code really only does one thing of interest. Pay attention to the statement <strong>Workspace.GetLocalItemForServerItem(s)</strong>. This statement converts the server paths you provided to local paths for the build agent currently executing the build request. The rest of the code is just syntactic sugar to get this into a single assignment activity. You're more than welcome, if not encouraged, to split this into a few different activities to handle: the condition where no server reference paths are provided, and to iterate over the server reference paths in a more readable fashion.</p>
<h3>What's Next?</h3>
<p>That's pretty much it. By setting the <strong>MSBuildArguments </strong>argument the build will automatically pass that info to <strong>MSBuild </strong>via the command line.</p>
<p>I <strong><em>may</em></strong> do a Part 3 for this series which would include the ability to use server paths which exist outside the workspace of the build definition.<br />
<script type="text/javascript"><!--
google_ad_client = "pub-1651361775697909";
/* 468x60, created 1/19/11 */
google_ad_slot = "4010823669";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://sidneyforcier.com/wordpress/?feed=rss2&amp;p=45</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Team Build 2010: Allow parameter modification when queuing a build</title>
		<link>http://sidneyforcier.com/wordpress/?p=68</link>
		<comments>http://sidneyforcier.com/wordpress/?p=68#comments</comments>
		<pubDate>Thu, 04 Nov 2010 02:13:16 +0000</pubDate>
		<dc:creator>sforcier</dc:creator>
				<category><![CDATA[TFS 2010]]></category>
		<category><![CDATA[Team Build 2010]]></category>

		<guid isPermaLink="false">http://sidneyforcier.com/wordpress/?p=68</guid>
		<description><![CDATA[If you have modified a build process template and are exposing an argument via the Metadata process parameter collection (that is, you're making it show up on the Parameter tab when the build definition is modified) and it's not showing up when new builds are being queued, you can add it by following these steps: [...]]]></description>
			<content:encoded><![CDATA[<p>If you have modified a build process template and are exposing an argument via the <strong>Metadata</strong> process parameter collection (that is, you're making it show up on the <strong>Parameter </strong>tab when the build definition is modified) and it's not showing up when new builds are being queued, you can add it by following these steps:</p>
<ol>
<li>Open the build process template.</li>
<li>Click Arguments in the designer.</li>
<li>Click "..." to access metadata.<br />
<a href="http://sidneyforcier.com/wordpress/wp-content/uploads/2010/11/Metadata5.png"><img class="alignnone size-full wp-image-85" title="Metadata" src="http://sidneyforcier.com/wordpress/wp-content/uploads/2010/11/Metadata5.png" alt="" width="500" height="91" /></a><br />
 </li>
<li>Change "View this Parameter When" to "Always show the Parameter"<br />
<a href="http://sidneyforcier.com/wordpress/wp-content/uploads/2010/11/ViewParameterWhen.png"><img class="alignnone size-full wp-image-76" title="ViewParameterWhen" src="http://sidneyforcier.com/wordpress/wp-content/uploads/2010/11/ViewParameterWhen.png" alt="" width="464" height="548" /></a></li>
</ol>
<p><script type="text/javascript"><!--
google_ad_client = "pub-1651361775697909";
/* 468x60, created 1/19/11 */
google_ad_slot = "4010823669";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://sidneyforcier.com/wordpress/?feed=rss2&amp;p=68</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Team Build 2010: Reference Hint Path &#8211; Part 1 (The old fashioned way)</title>
		<link>http://sidneyforcier.com/wordpress/?p=41</link>
		<comments>http://sidneyforcier.com/wordpress/?p=41#comments</comments>
		<pubDate>Sun, 24 Oct 2010 00:56:17 +0000</pubDate>
		<dc:creator>sforcier</dc:creator>
				<category><![CDATA[TFS 2010]]></category>
		<category><![CDATA[Team Build 2010]]></category>

		<guid isPermaLink="false">http://sidneyforcier.com/wordpress/?p=41</guid>
		<description><![CDATA[To specify additional reference hint paths for Team Build 2008 you can simply use the <strong>ReferencePath</strong> parameter for MSBuild 3.5:

<strong>/p:ReferencePath="c:\foo\release;c:\bar\release"</strong>

MSBuild 4.0 didn't change this, but Team Build 2010 abstracted it a little.]]></description>
			<content:encoded><![CDATA[<p>To specify additional reference hint paths for Team Build 2008 you can simply use the <strong>ReferencePath</strong> parameter for MSBuild 3.5:</p>
<p><strong>/p:ReferencePath="c:\foo\release;c:\bar\release"</strong></p>
<p>MSBuild 4.0 didn't change this, but Team Build 2010 abstracted it a little. Under the <strong>Advanced</strong> category of a Build Definition's parameters, there's a field called <strong>MSBuild Arguments</strong>. You can pass whatever you want here, and it will behave the same as the parameters text box in Team Build 2008. So all you need to do is set your <strong>ReferencePath </strong>parameter like the example above, and you're good to go.</p>
<p>But there's a problem with this... relative paths aren't supported. In part two I'll come up with a way to work around this issue.<br />
<script type="text/javascript"><!--
google_ad_client = "pub-1651361775697909";
/* 468x60, created 1/19/11 */
google_ad_slot = "4010823669";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://sidneyforcier.com/wordpress/?feed=rss2&amp;p=41</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Team Build 2010: &#8220;Installing&#8221; an Assembly</title>
		<link>http://sidneyforcier.com/wordpress/?p=7</link>
		<comments>http://sidneyforcier.com/wordpress/?p=7#comments</comments>
		<pubDate>Sat, 23 Oct 2010 23:54:04 +0000</pubDate>
		<dc:creator>sforcier</dc:creator>
				<category><![CDATA[TFS 2010]]></category>
		<category><![CDATA[Team Build 2010]]></category>

		<guid isPermaLink="false">http://sidneyforcier.com/wordpress/?p=7</guid>
		<description><![CDATA[Here's how to get Team Build 2010 to notice an assembly: Make sure the assembly has at least one Workflow Activity in it. If you didn't write the assembly, this shouldn't be a problem. Check the assembly in to source control. In Team Explorer, right click "Buids" and choose "Manage Build Controllers..." Choose your Build [...]]]></description>
			<content:encoded><![CDATA[<p>Here's how to get Team Build 2010 to notice an assembly:</p>
<ol>
<li>Make sure the assembly has at least one Workflow Activity in it. If you didn't write the assembly, this shouldn't be a problem.</li>
<li>Check the assembly in to source control.</li>
<li>In Team Explorer, right click "Buids" and choose "Manage Build Controllers..."</li>
<li>Choose your Build Controller and click "Properties"</li>
<li>Set "Version control path to custom assemblies:" to the path from step 2.</li>
<li>Click "Ok"</li>
<li>Click "Close"</li>
</ol>
<p><script type="text/javascript"><!--
google_ad_client = "pub-1651361775697909";
/* 468x60, created 1/19/11 */
google_ad_slot = "4010823669";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://sidneyforcier.com/wordpress/?feed=rss2&amp;p=7</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

