<?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>KevFoo &#187; CI</title>
	<atom:link href="http://blog.kevfoo.com/index.php/category/ci/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.kevfoo.com</link>
	<description>The weblog of a Chicago based .Net and iPhone developer.</description>
	<lastBuildDate>Wed, 26 May 2010 13:33:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Tree Surgeon: Review and a couple tips</title>
		<link>http://blog.kevfoo.com/index.php/2009/03/tree-surgeon-review-and-a-couple-tips/</link>
		<comments>http://blog.kevfoo.com/index.php/2009/03/tree-surgeon-review-and-a-couple-tips/#comments</comments>
		<pubDate>Sat, 07 Mar 2009 19:01:50 +0000</pubDate>
		<dc:creator>Kevin McMahon</dc:creator>
				<category><![CDATA[CI]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[Assembly Name]]></category>
		<category><![CDATA[Codeplex]]></category>
		<category><![CDATA[Core Library]]></category>
		<category><![CDATA[Couple Tips]]></category>
		<category><![CDATA[Directory Structure]]></category>
		<category><![CDATA[Documents Folder]]></category>
		<category><![CDATA[Major Tools]]></category>
		<category><![CDATA[Mbunit]]></category>
		<category><![CDATA[New Projects]]></category>
		<category><![CDATA[Nunit]]></category>
		<category><![CDATA[Project Forums]]></category>
		<category><![CDATA[Source Tree]]></category>
		<category><![CDATA[Source Trees]]></category>
		<category><![CDATA[Test Assembly]]></category>
		<category><![CDATA[Test Framework]]></category>
		<category><![CDATA[Test Project]]></category>
		<category><![CDATA[Tree Surgeon]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Unit Test]]></category>
		<category><![CDATA[Zip Files]]></category>

		<guid isPermaLink="false">http://blog.kevfoo.com/index.php/2009/03/tree-surgeon-review-and-a-couple-tips/</guid>
		<description><![CDATA[This past week I was playing around with Hudson and Team City and getting some NAnt scripts put together to use.&#160; In a happy coincidence I happened to catch a mention about Tree Surgeon from twitter and it had piqued my curiosity.&#160; Tree Surgeon is a project on CodePlex that has been around for a [...]]]></description>
			<content:encoded><![CDATA[<p>This past week I was playing around with <a href="https://hudson.dev.java.net/">Hudson</a> and <a href="http://www.jetbrains.com/teamcity/index.html">Team City</a> and getting some NAnt scripts put together to use.&#160; In a happy coincidence I happened to catch a mention about <a href="http://treesurgeon.codeplex.com/">Tree Surgeon</a> from twitter and it had piqued my curiosity.&#160; Tree Surgeon is a project on CodePlex that has been around for a while and helps automate the process of setting up a source tree and assembling build scripts.&#160; It was just what I was looking for.</p>
<p>The goal of Tree Surgeon was to make setting up and laying out new projects using best practices dead simple.&#160; All the major tools and libraries that typically find their way into your .Net source trees are provided for you.&#160; In addition to laying out the directory structure for your source and libraries, a solution file gets created with three main projects to get you started.&#160; The basic project setup includes a console app, core library and unit test project.&#160; The build scripts come pre-wired to have NCover run your tests and generate reports from the results and also do things like packaging your build artifacts into zip files for deployment.</p>
<p>The whole process, start to project generated, is very easy.&#160; Download and run the installer.&#160; Launch the program, select the version of Visual Studio (2003, 2005, and 2008) and the flavor of testing framework (NUnit or MbUnit) and then hit generate.&#160; The files and directories, built out in your Documents folder, are then created and ready to be used.</p>
<p>There are two slight issues I ran into that I’d like to point out.&#160; Both issues had already been noted in the project forums and were easy to fix.&#160; When generating a source tree with MbUnit selected as the unit test framework, the build script generated has the unit test assembly referenced is named incorrectly.&#160; You will have to change it to match your project’s unit test assembly name.&#160; The second issue has to do with running NCover and NUnit on x64 machines.&#160; I found that in order for NCover and NUnit to work on x64 machines I had to add two calls to the CorFlags utility to make executables work.&#160; This was accomplished by making the modifications to the ‘run-unit-tests’ target below on lines 5-8.</p>
<div>
<div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   1:</span> <span style="color: #0000ff">&lt;</span><span style="color: #800000">target</span> <span style="color: #ff0000">name</span><span style="color: #0000ff">=&quot;run-unit-tests&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   2:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">mkdir</span> <span style="color: #ff0000">dir</span><span style="color: #0000ff">=&quot;${build.dir}\test-reports&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   3:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">exec</span> <span style="color: #ff0000">program</span><span style="color: #0000ff">=&quot;regsvr32&quot;</span> <span style="color: #ff0000">workingdir</span><span style="color: #0000ff">=&quot;tools\NCover&quot;</span> <span style="color: #ff0000">commandline</span><span style="color: #0000ff">=&quot;/s CoverLib.dll&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   4:</span>     <span style="color: #008000">&lt;!-- Need the CorFlags Commands For x64 --&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   5:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">exec</span> <span style="color: #ff0000">program</span><span style="color: #0000ff">=&quot;C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\CorFlags&quot;</span> </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   6:</span>         <span style="color: #ff0000">workingdir</span><span style="color: #0000ff">=&quot;tools\NCover&quot;</span> <span style="color: #ff0000">commandline</span><span style="color: #0000ff">=&quot;NCover.Console.exe /32BIT+&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   7:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">exec</span> <span style="color: #ff0000">program</span><span style="color: #0000ff">=&quot;c:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\CorFlags&quot;</span> </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   8:</span>         <span style="color: #ff0000">workingdir</span><span style="color: #0000ff">=&quot;tools\NUnit&quot;</span> <span style="color: #ff0000">commandline</span><span style="color: #0000ff">=&quot;NUnit-Console.Exe /32BIT+&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   9:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">exec</span> <span style="color: #ff0000">program</span><span style="color: #0000ff">=&quot;tools\ncover\NCover.Console.exe&quot;</span> </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  10:</span>         <span style="color: #ff0000">workingdir</span><span style="color: #0000ff">=&quot;${build.dir}\Debug\UnitTests&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  11:</span>         <span style="color: #0000ff">&lt;</span><span style="color: #800000">arg</span> <span style="color: #ff0000">value</span><span style="color: #0000ff">=&quot;//w &amp;quot;.&amp;quot;&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  12:</span>         <span style="color: #0000ff">&lt;</span><span style="color: #800000">arg</span> <span style="color: #ff0000">value</span><span style="color: #0000ff">=&quot;//x &amp;quot;..\..\test-reports\Coverage.xml&amp;quot;&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  13:</span>         <span style="color: #0000ff">&lt;</span><span style="color: #800000">arg</span> <span style="color: #ff0000">value</span><span style="color: #0000ff">=&quot;&amp;quot;..\..\..\tools\nunit\nunit-console.exe&amp;quot;&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  14:</span>         <span style="color: #0000ff">&lt;</span><span style="color: #800000">arg</span> <span style="color: #ff0000">value</span><span style="color: #0000ff">=&quot;&amp;quot;MyProjectName.UnitTests.dll&amp;quot; </pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  15:</span>             &amp;quot;/xml:..\..\test-reports\UnitTests.xml&amp;quot; &amp;quot;/nologo&amp;quot;&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  16:</span>     <span style="color: #0000ff">&lt;/</span><span style="color: #800000">exec</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  17:</span> <span style="color: #0000ff">&lt;/</span><span style="color: #800000">target</span><span style="color: #0000ff">&gt;</span></pre>
</p></div>
</div>
<p>Even though I am pretty late to the party with Tree Surgeon I am very happy to have stumbled across it.&#160; The whole source tree and build script setup process is the perfect thing to script out and I am really glad the project creator and contributors have taken the time to do this.&#160; It is a big help and I highly recommend you try it out the next time you are spinning up a new source tree for a project.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kevfoo.com/index.php/2009/03/tree-surgeon-review-and-a-couple-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
