treesurgeon Wiki & Documentation Rss Feedhttp://www.codeplex.com/treesurgeon/Wiki/View.aspx?title=Hometreesurgeon Wiki Rss DescriptionUpdated Wiki: Abouthttp://treesurgeon.codeplex.com/wikipage?title=About&version=5<div class="wikidoc"><h2>About</h2>
<b>Open Source</b><br />Tree Surgeon is an open source project. This means you are free to use it, and the source code is available to look at.<br /><br />Tree Surgeon is released under the MIT License. Please make sure to read the <a href="http://www.codeplex.com/treesurgeon/Project/License.aspx">License</a> before using or distributing the software.<br /><br /><b>Project Team</b><br />Check out the team <a href="http://treesurgeon.codeplex.com/team/view">here</a>.<br /><br /><b>Copyright</b><br />Copyright &#169; 2007 - 2012 Bil Simser<br />Copyright &#169; 2005 - 2006 Mike Roberts &amp; ThoughtWorks <br /></div><div class="ClearBoth"></div>bsimserThu, 31 May 2012 12:31:39 GMTUpdated Wiki: About 20120531123139PUpdated Wiki: Documentationhttp://treesurgeon.codeplex.com/documentation?version=11<div class="wikidoc"><h2>Using Tree Surgeon</h2>
Tree Surgeon is pretty simple, but it is fully functional. Its based on Mike Roberts&#39;s series of articles on How to setup a .NET Development Tree (see links below).<br /><br />Download the installer, and just run the GUI. Your generated project will appear in your My Documents folder and you should move it to wherever you like to develop on your machine (the meta-root if you read the article above.)<br /><br />Your generated project has a Visual Studio solution waiting for you in the src folder. Also, if you go into the project root directory, you can run an automated build. It should look a bit like this:<br /><br /><pre>
C:\Program Files\TreeSurgeon\MyNewProject&gt;go
NAnt 0.85 (Build 0.85.1793.0; rc1; 28/11/2004)
Copyright (C) 2001-2004 Gerry Shaw
http://nant.sourceforge.net
Buildfile: file:///C:/Program Files/TreeSurgeon/MyNewProject/MyNewProject.build
Target(s) specified: test
compile:
[solution] Starting solution build.
[solution] Building &#39;MyNewProjectConsole&#39; [AutomatedDebug] ...
[solution] Building &#39;Core&#39; [AutomatedDebug] ...
[solution] Building &#39;UnitTests&#39; [AutomatedDebug] ...
run-unit-tests:
[mkdir] Creating directory &#39;C:\Program Files\TreeSurgeon\MyNewProject\build\test-reports&#39;.
[exec] NUnit version 2.2.2
[exec] Copyright (C) 2002-2003 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov, Charlie Poole.
[exec] Copyright (C) 2000-2003 Philip Craig.
[exec] All Rights Reserved.
[exec]
[exec] OS Version: Microsoft Windows NT 5.1.2600.0 .NET Version: 1.1.4322.2032
[exec]
[exec] .
[exec] Tests run: 1, Failures: 0, Not run: 0, Time: 0.060 seconds
[exec]
[exec]
test:
BUILD SUCCEEDED
Total time: 4.4 seconds.
</pre>
<h2>Creating a .NET Development Tree Blog Series</h2>
This is the series of blog posts created by Mike Roberts that started Tree Surgeon.<br /><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreeIntroduction&referringTitle=Documentation">Introduction</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart1&referringTitle=Documentation">Building the Development Tree</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart2&referringTitle=Documentation">Adding Files to the Tree</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart3&referringTitle=Documentation">Checking into Source Control</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart4&referringTitle=Documentation">Automating the Build</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart5&referringTitle=Documentation">Extending the Build</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart6&referringTitle=Documentation">Adding Unit Tests</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart7&referringTitle=Documentation">Automating Unit Tests and Packaging</a></div><div class="ClearBoth"></div>bsimserThu, 31 May 2012 12:30:15 GMTUpdated Wiki: Documentation 20120531123015PUpdated Wiki: Documentationhttp://treesurgeon.codeplex.com/documentation?version=10<div class="wikidoc"><h2>Using Tree Surgeon</h2>
Tree Surgeon is pretty simple, but it is fully functional. Its based on Mike Roberts&#39;s series of articles on How to setup a .NET Development Tree (see links below).<br /><br />Download the installer, and just run the GUI. Your generated project will appear in your My Documents folder and you should move it to wherever you like to develop on your machine (the meta-root if you read the article above.)<br /><br />Your generated project has a Visual Studio solution waiting for you in the src folder. Also, if you go into the project root directory, you can run an automated build. It should look a bit like this:<br /><br /><pre>
C:\Program Files\TreeSurgeon\MyNewProject&gt;go
NAnt 0.85 (Build 0.85.1793.0; rc1; 28/11/2004)
Copyright (C) 2001-2004 Gerry Shaw
http://nant.sourceforge.net
Buildfile: file:///C:/Program Files/TreeSurgeon/MyNewProject/MyNewProject.build
Target(s) specified: test
compile:
[solution] Starting solution build.
[solution] Building &#39;MyNewProjectConsole&#39; [AutomatedDebug] ...
[solution] Building &#39;Core&#39; [AutomatedDebug] ...
[solution] Building &#39;UnitTests&#39; [AutomatedDebug] ...
run-unit-tests:
[mkdir] Creating directory &#39;C:\Program Files\TreeSurgeon\MyNewProject\build\test-reports&#39;.
[exec] NUnit version 2.2.2
[exec] Copyright (C) 2002-2003 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov, Charlie Poole.
[exec] Copyright (C) 2000-2003 Philip Craig.
[exec] All Rights Reserved.
[exec]
[exec] OS Version: Microsoft Windows NT 5.1.2600.0 .NET Version: 1.1.4322.2032
[exec]
[exec] .
[exec] Tests run: 1, Failures: 0, Not run: 0, Time: 0.060 seconds
[exec]
[exec]
test:
BUILD SUCCEEDED
Total time: 4.4 seconds.
</pre><br />
<h2>Creating a .NET Development Tree Blog Series</h2>
This is the series of blog posts created by Mike Roberts that started Tree Surgeon.<br /><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreeIntroduction&referringTitle=Documentation">Introduction</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart1&referringTitle=Documentation">Building the Development Tree</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart2&referringTitle=Documentation">Adding Files to the Tree</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart3&referringTitle=Documentation">Checking into Source Control</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart4&referringTitle=Documentation">Automating the Build</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart5&referringTitle=Documentation">Extending the Build</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart6&referringTitle=Documentation">Adding Unit Tests</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart7&referringTitle=Documentation">Automating Unit Tests and Packaging</a></div><div class="ClearBoth"></div>bsimserThu, 31 May 2012 12:29:56 GMTUpdated Wiki: Documentation 20120531122956PUpdated Wiki: Homehttp://treesurgeon.codeplex.com/wikipage?version=13<div class="wikidoc"><h2>Welcome to the Tree Surgeon Project</h2>
<img src="http://i3.codeplex.com/Download?ProjectName=treesurgeon&DownloadId=22480" alt="TreeSurgeon.jpg" title="TreeSurgeon.jpg" /><br /><br />Have you ever spent a few days setting up a new development tree? Have you ever spent several days setting up several development trees? Have you even spent weeks trying to perfect all your development trees using a set of best practices?<br /><br />If the answer to any of the above answers is &#39;yes&#39;, then you&#39;ll like Tree Surgeon!<br /><br />Tree Surgeon is a .NET development tree generator. Just give it the name of your project, and it will set up a development tree for you <b>in seconds</b>. More than that, your new tree has years worth of accumulated build engineering experience built right in.<br /><br />Give Tree Surgeon a spin today!<br />
<h2>More Information</h2>
<a href="http://treesurgeon.codeplex.com/wikipage?title=Download&referringTitle=Home">Download</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=Acknowledgments&referringTitle=Home">Acknowledgments</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=About&referringTitle=Home">About</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=Support&referringTitle=Home">Support</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=License&referringTitle=Home">License</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=Development&referringTitle=Home">Development</a></div><div class="ClearBoth"></div>bsimserThu, 31 May 2012 12:28:59 GMTUpdated Wiki: Home 20120531122859PUpdated Wiki: Documentationhttp://treesurgeon.codeplex.com/documentation?version=9<div class="wikidoc"><h2>Creating a .NET Development Tree Blog Series</h2>
This is the series of blog posts created by Mike Roberts that started Tree Surgeon.<br /><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreeIntroduction&referringTitle=Documentation">Introduction</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart1&referringTitle=Documentation">Building the Development Tree</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart2&referringTitle=Documentation">Adding Files to the Tree</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart3&referringTitle=Documentation">Checking into Source Control</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart4&referringTitle=Documentation">Automating the Build</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart5&referringTitle=Documentation">Extending the Build</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart6&referringTitle=Documentation">Adding Unit Tests</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart7&referringTitle=Documentation">Automating Unit Tests and Packaging</a></div><div class="ClearBoth"></div>bsimserThu, 31 May 2012 12:28:26 GMTUpdated Wiki: Documentation 20120531122826PUpdated Wiki: Documentationhttp://treesurgeon.codeplex.com/documentation?version=8<div class="wikidoc"><h2>Creating a .NET Development Tree Blog Series</h2>
This is the series of blog posts created by Mike Roberts that started Tree Surgeon.<br /><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreeIntroduction&referringTitle=Documentation">Introduction</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart1&referringTitle=Documentation">Building the Development Tree</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart2&referringTitle=Documentation">Adding Files to the Tree</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart3&referringTitle=Documentation">Checking into Source Control</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart4&referringTitle=Documentation">Automating the Build</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart5&referringTitle=Documentation">Extending the Build</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart6&referringTitle=Documentation">Adding Unit Tests</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart7&referringTitle=Documentation">DevelopmentTreePart7</a></div><div class="ClearBoth"></div>bsimserThu, 31 May 2012 12:27:52 GMTUpdated Wiki: Documentation 20120531122752PUpdated Wiki: Documentationhttp://treesurgeon.codeplex.com/documentation?version=7<div class="wikidoc"><h2>Creating a .NET Development Tree Blog Series</h2>
This is the series of blog posts created by Mike Roberts that started Tree Surgeon.<br /><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreeIntroduction&referringTitle=Documentation">Introduction</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart1&referringTitle=Documentation">Building the Development Tree</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart2&referringTitle=Documentation">Adding Files to the Tree</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart3&referringTitle=Documentation">Checking into Source Control</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart4&referringTitle=Documentation">Automating the Build</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart5&referringTitle=Documentation">DevelopmentTreePart5</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart6&referringTitle=Documentation">DevelopmentTreePart6</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart7&referringTitle=Documentation">DevelopmentTreePart7</a></div><div class="ClearBoth"></div>bsimserThu, 31 May 2012 12:27:06 GMTUpdated Wiki: Documentation 20120531122706PUpdated Wiki: Documentationhttp://treesurgeon.codeplex.com/documentation?version=6<div class="wikidoc"><h2>Creating a .NET Development Tree Blog Series</h2>
This is the series of blog posts created by Mike Roberts that started Tree Surgeon.<br /><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreeIntroduction&referringTitle=Documentation">Introduction</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart1&referringTitle=Documentation">Building the Development Tree</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart2&referringTitle=Documentation">Adding Files to the Tree</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart3&referringTitle=Documentation">DevelopmentTreePart3</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart4&referringTitle=Documentation">DevelopmentTreePart4</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart5&referringTitle=Documentation">DevelopmentTreePart5</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart6&referringTitle=Documentation">DevelopmentTreePart6</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart7&referringTitle=Documentation">DevelopmentTreePart7</a></div><div class="ClearBoth"></div>bsimserThu, 31 May 2012 12:26:20 GMTUpdated Wiki: Documentation 20120531122620PUpdated Wiki: Documentationhttp://treesurgeon.codeplex.com/documentation?version=5<div class="wikidoc"><h2>Creating a .NET Development Tree Blog Series</h2>
This is the series of blog posts created by Mike Roberts that started Tree Surgeon.<br /><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreeIntroduction&referringTitle=Documentation">Introduction</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart1&referringTitle=Documentation">Building the Development Tree</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart2&referringTitle=Documentation">DevelopmentTreePart2</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart3&referringTitle=Documentation">DevelopmentTreePart3</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart4&referringTitle=Documentation">DevelopmentTreePart4</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart5&referringTitle=Documentation">DevelopmentTreePart5</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart6&referringTitle=Documentation">DevelopmentTreePart6</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart7&referringTitle=Documentation">DevelopmentTreePart7</a></div><div class="ClearBoth"></div>bsimserThu, 31 May 2012 12:25:40 GMTUpdated Wiki: Documentation 20120531122540PUpdated Wiki: Documentationhttp://treesurgeon.codeplex.com/documentation?version=4<div class="wikidoc"><h2>Creating a .NET Development Tree Blog Series</h2>
This is the series of blog posts created by Mike Roberts that started Tree Surgeon.<br /><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreeIntroduction&referringTitle=Documentation">Introduction</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart1&referringTitle=Documentation">DevelopmentTreePart1</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart2&referringTitle=Documentation">DevelopmentTreePart2</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart3&referringTitle=Documentation">DevelopmentTreePart3</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart4&referringTitle=Documentation">DevelopmentTreePart4</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart5&referringTitle=Documentation">DevelopmentTreePart5</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart6&referringTitle=Documentation">DevelopmentTreePart6</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart7&referringTitle=Documentation">DevelopmentTreePart7</a></div><div class="ClearBoth"></div>bsimserThu, 31 May 2012 12:25:17 GMTUpdated Wiki: Documentation 20120531122517PUpdated Wiki: Documentationhttp://treesurgeon.codeplex.com/documentation?version=3<div class="wikidoc"><h2>Creating a .NET Development Tree Blog Series</h2>
This is the series of blog posts created by Mike Roberts that started Tree Surgeon.<br /><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=Introduction&referringTitle=Documentation">DevelopmentTreeIntroduction</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart1&referringTitle=Documentation">DevelopmentTreePart1</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart2&referringTitle=Documentation">DevelopmentTreePart2</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart3&referringTitle=Documentation">DevelopmentTreePart3</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart4&referringTitle=Documentation">DevelopmentTreePart4</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart5&referringTitle=Documentation">DevelopmentTreePart5</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart6&referringTitle=Documentation">DevelopmentTreePart6</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart7&referringTitle=Documentation">DevelopmentTreePart7</a></div><div class="ClearBoth"></div>bsimserThu, 31 May 2012 12:24:56 GMTUpdated Wiki: Documentation 20120531122456PUpdated Wiki: Documentationhttp://treesurgeon.codeplex.com/documentation?version=2<div class="wikidoc"><h2>Creating a .NET Development Tree Blog Series</h2>
This is the series of blog posts created by Mike Roberts that started Tree Surgeon.<br /><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreeIntroduction&referringTitle=Documentation">DevelopmentTreeIntroduction</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart1&referringTitle=Documentation">DevelopmentTreePart1</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart2&referringTitle=Documentation">DevelopmentTreePart2</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart3&referringTitle=Documentation">DevelopmentTreePart3</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart4&referringTitle=Documentation">DevelopmentTreePart4</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart5&referringTitle=Documentation">DevelopmentTreePart5</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart6&referringTitle=Documentation">DevelopmentTreePart6</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreePart7&referringTitle=Documentation">DevelopmentTreePart7</a></div><div class="ClearBoth"></div>bsimserThu, 31 May 2012 12:24:27 GMTUpdated Wiki: Documentation 20120531122427PUpdated Wiki: Homehttp://treesurgeon.codeplex.com/wikipage?version=12<div class="wikidoc"><h2>Welcome to the Tree Surgeon Project</h2>
<img src="http://i3.codeplex.com/Download?ProjectName=treesurgeon&DownloadId=22480" alt="TreeSurgeon.jpg" title="TreeSurgeon.jpg" /><br /><br />Have you ever spent a few days setting up a new development tree? Have you ever spent several days setting up several development trees? Have you even spent weeks trying to perfect all your development trees using a set of best practices?<br /><br />If the answer to any of the above answers is &#39;yes&#39;, then you&#39;ll like Tree Surgeon!<br /><br />Tree Surgeon is a .NET development tree generator. Just give it the name of your project, and it will set up a development tree for you <b>in seconds</b>. More than that, your new tree has years worth of accumulated build engineering experience built right in.<br /><br />Give Tree Surgeon a spin today!<br />
<h2>Using Tree Surgeon</h2>
Tree Surgeon is available to Download. Its pretty simple, but it is fully functional. Its based on Mike Roberts&#39;s series of articles on How to setup a .NET Development Tree .<br /><br />Download the installer, and just run the GUI. Your generated project will appear in your My Documents folder and you should move it to wherever you like to develop on your machine (the meta-root if you read the article above.)<br /><br />Your generated project has a Visual Studio solution waiting for you in the src folder. Also, if you go into the project root directory, you can run an automated build. It should look a bit like:<br /><pre>
C:\Program Files\TreeSurgeon\MyNewProject&gt;go
NAnt 0.85 (Build 0.85.1793.0; rc1; 28/11/2004)
Copyright (C) 2001-2004 Gerry Shaw
http://nant.sourceforge.net
Buildfile: file:///C:/Program Files/TreeSurgeon/MyNewProject/MyNewProject.build
Target(s) specified: test
compile:
[solution] Starting solution build.
[solution] Building &#39;MyNewProjectConsole&#39; [AutomatedDebug] ...
[solution] Building &#39;Core&#39; [AutomatedDebug] ...
[solution] Building &#39;UnitTests&#39; [AutomatedDebug] ...
run-unit-tests:
[mkdir] Creating directory &#39;C:\Program Files\TreeSurgeon\MyNewProject\build\test-reports&#39;.
[exec] NUnit version 2.2.2
[exec] Copyright (C) 2002-2003 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov, Charlie Poole.
[exec] Copyright (C) 2000-2003 Philip Craig.
[exec] All Rights Reserved.
[exec]
[exec] OS Version: Microsoft Windows NT 5.1.2600.0 .NET Version: 1.1.4322.2032
[exec]
[exec] .
[exec] Tests run: 1, Failures: 0, Not run: 0, Time: 0.060 seconds
[exec]
[exec]
test:
BUILD SUCCEEDED
Total time: 4.4 seconds.
</pre><br />
<h2>More Information</h2>
<a href="http://treesurgeon.codeplex.com/wikipage?title=Download&referringTitle=Home">Download</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=Acknowledgments&referringTitle=Home">Acknowledgments</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=About&referringTitle=Home">About</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=Support&referringTitle=Home">Support</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=License&referringTitle=Home">License</a><br /><a href="http://treesurgeon.codeplex.com/wikipage?title=Development&referringTitle=Home">Development</a></div><div class="ClearBoth"></div>bsimserThu, 31 May 2012 12:24:04 GMTUpdated Wiki: Home 20120531122404PUpdated Wiki: Documentationhttp://treesurgeon.codeplex.com/documentation?version=1<div class="wikidoc">Links</div><div class="ClearBoth"></div>bsimserThu, 31 May 2012 12:23:38 GMTUpdated Wiki: Documentation 20120531122338PUpdated Wiki: Developmenthttp://www.codeplex.com/treesurgeon/Wiki/View.aspx?title=Development&version=5<div class="wikidoc">
<h2>
Development
</h2> <br /><b>Source Control</b><br />Tree Surgeon uses <a href="http://www.codeplex.com/treesurgeon/SourceControl/ListDownloadableCommits.aspx" class="externalLink">Team Foundation Server on CodePlex<span class="externalLinkIcon"></span></a> to manage it's codebase. You can access the repository (preferred) using any Subversion client. The SVN address for the project is <a href="https://treesurgeon.svn.codeplex.com/svn" class="externalLink">https://treesurgeon.svn.codeplex.com/svn<span class="externalLinkIcon"></span></a>.<br /> <br /><b>Issue Tracking</b><br />Issue Tracking is done using CodePlex <a href="http://www.codeplex.com/treesurgeon/WorkItem/List.aspx" class="externalLink">here<span class="externalLinkIcon"></span></a>.<br /> <br /><b>Version Naming</b><br /> <br /><i>Released Versions</i><br /> <br />Released versions have the following numbering:<br /> <br />Major.minor.revision.buildnumber, where <br /><ul>
<li>We plan on updating Major versions only on a major milestone in the project. </li><li>We update <b>minor</b> versions when there is a significant improvement in the application, or a breaking change in configuration since the previous release. When updating the <b>minor</b> version number, we reset the <b>revision</b> to zero. </li><li>We use <b>revision</b> numbers of more than 0 when we do not want to update the minor version number, but do want to make a new release. This may be due to some bugfixes, minor updates, etc. We never just increase the <b>revision</b> number if there has been a breaking change </li><li><b>buildnumber</b> is the Continuous Integration build number. We never reset this. A buildnumber of 0 implies a build that was produced outside of our Continuous Integration environment </li>
</ul> <br />Our Continuous Integration process creates a build label that includes the <b>Major.minor.revision</b> part. We update this as late as possible before a release, or release candidate, for a new release version.<br /> <br /><i>Unreleased versions</i><br /> <br />Unreleased versions have the following names:<br /> <br /><ul>
<li><b>Next</b> - The next release, where the final release name has not yet been set </li><li><b>Soon</b> - Issues that we hope to resolve soon </li><li><b>Eventually</b> - Issues that we hope to resolve at some point in the future, but after the next major release </li>
</ul> <br />All unresolved issues should be assigned to one of these versions by a project administrator. Issues should only be moved to Next if they have been resolved since the last release, or are an unresolved blocker for the next release.<br /> <br /><b>Coding Standards</b><br /> <br />Coding standards on the project, should you decide to contribute to it, are pretty light (and open to negotiation and discussion):<br /> <br /><ul>
<li>All code has unit test coverage</li><li>private class fields using _ prefix with camelCase</li><li>properties are PascalCased</li><li>public methods are PascalCased</li><li>private/protected methods are preferred to be camelCased but are acceptable as PascalCased</li><li>Order of members in a class: fields, constructors, everything else</li><li>Use interfaces to define contracts</li><li>do not use regions </li>
</ul> <br />Use tabs, not spaces in your patches - Some folks like 2 spaces, some like 4, but that's an IDE setting. Change your IDE settings to use tabs, not spaces, and then you can set your tab to 2 spaces if you prefer that. Here is a quick macro to flip between tabs and spaces in Visual Studio: <a href="http://abombss.com/blog/2007/12/12/toggle-between-tabs-spaces-with-ease/" class="externalLink">http://abombss.com/blog/2007/12/12/toggle-between-tabs-spaces-with-ease/<span class="externalLinkIcon"></span></a><br /> <br /><b>Patches</b><br /> <br />To contribute new features to this project please follow these steps:<br /> <br /><ol>
<li>Download the source code from the source code repository. You can check it out with TortoiseSVN here: <a href="https://treesurgeon.svn.codeplex.com/svn" class="externalLink">https://treesurgeon.svn.codeplex.com/svn<span class="externalLinkIcon"></span></a></li><li>Add your feature.</li><li>Create a subversion patch for your code from the root directory using the instructions found <a href="http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-patch.html" class="externalLink">here<span class="externalLinkIcon"></span></a>.</li><li>Submit the patch to the patch upload page. Go to <a href="http://www.codeplex.com/treesurgeon/SourceControl/UploadPatch.aspx" class="externalLink">http://www.codeplex.com/treesurgeon/SourceControl/UploadPatch.aspx<span class="externalLinkIcon"></span></a> and upload the patch file.</li><li>Update the issue (story) you were working on with a note that you've uploaded a patch</li><li>Subscribe to the patch rss feed so that you know when a Committer adds comments to your submission.</li><li>The project coordinators will evaluate and apply your patch</li><li>If a committer makes some suggestions please take these at face value and help us keep a solid codebase. </li>
</ol> <br />
</div>bsimserWed, 31 Dec 2008 18:00:26 GMTUpdated Wiki: Development 20081231060026PUpdated Wiki: Developmenthttp://www.codeplex.com/treesurgeon/Wiki/View.aspx?title=Development&version=4<div class="wikidoc">
<h2>
Development
</h2> <br /><b>Source Control</b><br />Tree Surgeon uses <a href="http://www.codeplex.com/treesurgeon/SourceControl/ListDownloadableCommits.aspx" class="externalLink">Team Foundation Server on CodePlex<span class="externalLinkIcon"></span></a> to manage it's codebase. You can access the repository (preferred) using any Subversion client. The SVN address for the project is <a href="https://treesurgeon.svn.codeplex.com/svn" class="externalLink">https://treesurgeon.svn.codeplex.com/svn<span class="externalLinkIcon"></span></a>.<br /> <br /><b>Issue Tracking</b><br />Issue Tracking is done using CodePlex <a href="http://www.codeplex.com/treesurgeon/WorkItem/List.aspx" class="externalLink">here<span class="externalLinkIcon"></span></a>.<br /> <br /><b>Version Naming</b><br /> <br /><i>Released Versions</i><br /> <br />Released versions have the following numbering:<br /> <br />Major.minor.revision.buildnumber, where <br /><ul>
<li>We plan on updating Major versions only on a major milestone in the project. </li><li>We update <b>minor</b> versions when there is a significant improvement in the application, or a breaking change in configuration since the previous release. When updating the <b>minor</b> version number, we reset the <b>revision</b> to zero. </li><li>We use <b>revision</b> numbers of more than 0 when we do not want to update the minor version number, but do want to make a new release. This may be due to some bugfixes, minor updates, etc. We never just increase the <b>revision</b> number if there has been a breaking change </li><li><b>buildnumber</b> is the Continuous Integration build number. We never reset this. A buildnumber of 0 implies a build that was produced outside of our Continuous Integration environment </li>
</ul> <br />Our Continuous Integration process creates a build label that includes the <b>Major.minor.revision</b> part. We update this as late as possible before a release, or release candidate, for a new release version.<br /> <br /><i>Unreleased versions</i><br /> <br />Unreleased versions have the following names:<br /> <br /><ul>
<li><b>Next</b> - The next release, where the final release name has not yet been set </li><li><b>Soon</b> - Issues that we hope to resolve soon </li><li><b>Eventually</b> - Issues that we hope to resolve at some point in the future, but after the next major release </li>
</ul> <br />All unresolved issues should be assigned to one of these versions by a project administrator. Issues should only be moved to Next if they have been resolved since the last release, or are an unresolved blocker for the next release.<br /> <br /><i>Coding Standards</i><br /> <br />Coding standards on the project, should you decide to contribute to it, are pretty light (and open to negotiation and discussion):<br /> <br /><ul>
<li>All code has unit test coverage</li><li>private class fields using _ prefix with camelCase</li><li>properties are PascalCased</li><li>public methods are PascalCased</li><li>private/protected methods are preferred to be camelCased but are acceptable as PascalCased</li><li>Order of members in a class: fields, constructors, everything else</li><li>Use interfaces to define contracts</li><li>do not use regions </li>
</ul> <br />Use tabs, not spaces in your patches - Some folks like 2 spaces, some like 4, but that's an IDE setting. Change your IDE settings to use tabs, not spaces, and then you can set your tab to 2 spaces if you prefer that. Here is a quick macro to flip between tabs and spaces in Visual Studio: <a href="http://abombss.com/blog/2007/12/12/toggle-between-tabs-spaces-with-ease/" class="externalLink">http://abombss.com/blog/2007/12/12/toggle-between-tabs-spaces-with-ease/<span class="externalLinkIcon"></span></a><br /> <br /><i>Patches</i><br /> <br />To contribute new features to this project please follow these steps:<br /> <br /><ol>
<li>Download the source code from the source code repository. You can check it out with TortoiseSVN here: <a href="https://treesurgeon.svn.codeplex.com/svn" class="externalLink">https://treesurgeon.svn.codeplex.com/svn<span class="externalLinkIcon"></span></a></li><li>Add your feature.</li><li>Create a subversion patch for your code from the root directory using the instructions found <a href="http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-patch.html" class="externalLink">here<span class="externalLinkIcon"></span></a>.</li><li>Submit the patch to the patch upload page. Go to <a href="http://www.codeplex.com/treesurgeon/SourceControl/UploadPatch.aspx" class="externalLink">http://www.codeplex.com/treesurgeon/SourceControl/UploadPatch.aspx<span class="externalLinkIcon"></span></a> and upload the patch file.</li><li>Update the issue (story) you were working on with a note that you've uploaded a patch</li><li>Subscribe to the patch rss feed so that you know when a Committer adds comments to your submission.</li><li>The project coordinators will evaluate and apply your patch</li><li>If a committer makes some suggestions please take these at face value and help us keep a solid codebase. </li>
</ol> <br />
</div>bsimserWed, 31 Dec 2008 17:58:58 GMTUpdated Wiki: Development 20081231055858PUPDATED WIKI: Homehttp://www.codeplex.com/treesurgeon/Wiki/View.aspx?title=Home&version=11<div class="wikidoc">
<h2>
Welcome to the Tree Surgeon Project
</h2> <br /><img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=treesurgeon&amp;DownloadId=22480" alt="TreeSurgeon.jpg" /><br /> <br />Have you ever spent a few days setting up a new development tree? Have you ever spent several days setting up several development trees? Have you even spent weeks trying to perfect all your development trees using a set of best practices?<br /> <br />If the answer to any of the above answers is 'yes', then you'll like Tree Surgeon!<br /> <br />Tree Surgeon is a .NET development tree generator. Just give it the name of your project, and it will set up a development tree for you <b>in seconds</b>. More than that, your new tree has years worth of accumulated build engineering experience built right in.<br /> <br />Give Tree Surgeon a spin today!<br /> <br /><h2>
Using Tree Surgeon
</h2> <br />Tree Surgeon is available to Download. Its pretty simple, but it is fully functional. Its based on Mike Roberts's series of articles on How to setup a .NET Development Tree .<br /> <br />Download the installer, and just run the GUI. Your generated project will appear in your My Documents folder and you should move it to wherever you like to develop on your machine (the meta-root if you read the article above.)<br /> <br />Your generated project has a Visual Studio solution waiting for you in the src folder. Also, if you go into the project root directory, you can run an automated build. It should look a bit like:<br /><pre>
C:\Program Files\TreeSurgeon\MyNewProject&gt;go
NAnt 0.85 (Build 0.85.1793.0; rc1; 28/11/2004)
Copyright (C) 2001-2004 Gerry Shaw
http://nant.sourceforge.net
Buildfile: file:///C:/Program Files/TreeSurgeon/MyNewProject/MyNewProject.build
Target(s) specified: test
compile:
[solution] Starting solution build.
[solution] Building 'MyNewProjectConsole' [AutomatedDebug] ...
[solution] Building 'Core' [AutomatedDebug] ...
[solution] Building 'UnitTests' [AutomatedDebug] ...
run-unit-tests:
[mkdir] Creating directory 'C:\Program Files\TreeSurgeon\MyNewProject\build\test-reports'.
[exec] NUnit version 2.2.2
[exec] Copyright (C) 2002-2003 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov, Charlie Poole.
[exec] Copyright (C) 2000-2003 Philip Craig.
[exec] All Rights Reserved.
[exec]
[exec] OS Version: Microsoft Windows NT 5.1.2600.0 .NET Version: 1.1.4322.2032
[exec]
[exec] .
[exec] Tests run: 1, Failures: 0, Not run: 0, Time: 0.060 seconds
[exec]
[exec]
test:
BUILD SUCCEEDED
Total time: 4.4 seconds.
</pre> <br /><h2>
More Information
</h2> <br /><a href="http://www.codeplex.com/treesurgeon/Wiki/View.aspx?title=Download&amp;referringTitle=Home">Download</a><br /><a href="http://www.codeplex.com/treesurgeon/Wiki/View.aspx?title=Acknowledgments&amp;referringTitle=Home">Acknowledgments</a><br /><a href="http://www.codeplex.com/treesurgeon/Wiki/View.aspx?title=About&amp;referringTitle=Home">About</a><br /><a href="http://www.codeplex.com/treesurgeon/Wiki/View.aspx?title=Support&amp;referringTitle=Home">Support</a><br /><a href="http://www.codeplex.com/treesurgeon/Wiki/View.aspx?title=License&amp;referringTitle=Home">License</a><br /><a href="http://www.codeplex.com/treesurgeon/Wiki/View.aspx?title=Development&amp;referringTitle=Home">Development</a><br /> <br /><h2>
Original Creating a .NET Development Tree Blog Series
</h2>This is the series of blog posts created by Mike Roberts that started Tree Surgeon.<br /> <br /><a href="http://www.codeplex.com/treesurgeon/Wiki/View.aspx?title=DevelopmentTreeIntroduction&amp;referringTitle=Home">DevelopmentTreeIntroduction</a><br /><a href="http://www.codeplex.com/treesurgeon/Wiki/View.aspx?title=DevelopmentTreePart1&amp;referringTitle=Home">DevelopmentTreePart1</a><br /><a href="http://www.codeplex.com/treesurgeon/Wiki/View.aspx?title=DevelopmentTreePart2&amp;referringTitle=Home">DevelopmentTreePart2</a><br /><a href="http://www.codeplex.com/treesurgeon/Wiki/View.aspx?title=DevelopmentTreePart3&amp;referringTitle=Home">DevelopmentTreePart3</a><br /><a href="http://www.codeplex.com/treesurgeon/Wiki/View.aspx?title=DevelopmentTreePart4&amp;referringTitle=Home">DevelopmentTreePart4</a><br /><a href="http://www.codeplex.com/treesurgeon/Wiki/View.aspx?title=DevelopmentTreePart5&amp;referringTitle=Home">DevelopmentTreePart5</a><br /><a href="http://www.codeplex.com/treesurgeon/Wiki/View.aspx?title=DevelopmentTreePart6&amp;referringTitle=Home">DevelopmentTreePart6</a><br /><a href="http://www.codeplex.com/treesurgeon/Wiki/View.aspx?title=DevelopmentTreePart7&amp;referringTitle=Home">DevelopmentTreePart7</a><br />
</div>bsimserWed, 21 Nov 2007 22:53:33 GMTUPDATED WIKI: Home 20071121105333PUPDATED WIKI: DevelopmentTreePart6http://www.codeplex.com/treesurgeon/Wiki/View.aspx?title=DevelopmentTreePart6&version=2<div class="wikidoc">
<h1>
Part 6 - Adding Unit Tests
</h1>By now we have some source code checked in to our Source Control server. Its got a structured folder hierarchy and we're being careful about how we check specific files in (and ignore others). We're combining Visual Studio and NAnt to have a simple yet powerful automated build that works closely with the changes we make during interactive development.<br /> <br />So far though we only have 1 source file and shockingly no tests. We need to change this.<br /> <br />To do this we're going to create 2 new assemblies - one application DLL, and one DLL for unit tests. .NET won't allow you to use .exe assemblies as references for other projects, so a unit test DLL can only reference another DLL. Its slightly off-topic but because of this reason I try to keep my .exe projects as small as possible (because any classes in them can't be unit tested) and have nearly all code in a DLL.<br /> <br />So let's create our new Application DLL. I'm going to call it Core. Following the conventions we set down in part 2, the VS Project Folder is stored in src and we change the default namespace to SherwoodForest.Sycamore.Core. Before closing the Project Properties window though, there are 2 more things to change.<br /> <br />Firstly, for DLLs I like to use the naming convention that the Assembly has the same name as the default namespace. Also, following what we did in the previous part, create an 'AutomatedDebug' configuration, based on the 'Debug' Configuration, except with the output path of ..\..\build\Debug\Core. Make sure your Solution build configurations are all mapped correctly. We won't need the 'Class1' which VS automatically creates, so delete it.<br /> <br />We follow exactly the same procedure for our Unit Test DLL, giving the VS Project the (not particularly original, nevertheless informative) name of UnitTests. Save everything and make sure you can compile in Visual Studio and using your build script.<br /> <br />Before we write a test, we need to setup our project with NUnit. There's a few hoops to go through here but we only have to do it once for our project. Firstly, download NUnit - I'm going to be using NUnit 2.2.2 for this example. Download the binary zip file, not the MSI. While its downloading, open up your Global Assembly Cache (or GAC) - it will be in C:\Windows\Assembly, or something similar. Look to see if you have any NUnit assmblies in it. If you do, try to get rid of them by uninstalling any previous versions of NUnit from your computer.<br /> <br />Why are we worrying about not using the GAC and MSI's? Well, for pretty much exactly the reasons as we specified for NAnt, we want to use NUnit from our development tree . The problem is that if we have any NUnit assemblies in the GAC, they will take priority over the NUnit in our development tree. We could go through being explicit about the versions of NUnit each assembly requries, but that's a lot of hassle. Its easier just not to make NUnit a system wide tool, and this means getting it out of the GAC. (Mike Two, one of the NUnit authors, is probably going to shoot me for suggesting all of this. If you want to make NUnit a system tool then that will work too, you just have a few more hoops to jump through.)<br /> <br />By now your NUnit download should be complete. Extract it, take the bin folder and put in next to the nant folder in your project's tools folder. Rename it to nunit.<br /> <br />To create test fixtures in our UnitTests VS Project, we need to reference the nunit.framework assembly. This introduces a new concept - that of third party code dependencies. To implement these, I like to have a new toplevel folder in my project root called lib. Do this in your project and copy the nunit.framework.dll file from the NUnit distribution to the new folder. Once you've done that, add lib\nunit.framework.dll as a Reference to your UnitTests project.<br /> <br />Because of the previous step we now have the same file (nunit.framework.dll) copied twice in our development tree. Its worth doing this because we have a clear separation between code dependencies (in the lib folder) and build time tools (in the tools folder). We could delete the entire tools folder and the solution would still compile in Visual Studio. This is an example of making things clean and simple. It uses more disk space, but remember what we said back in Part 1 about that?<br /> <br />So finally we can actually write a test! For Sycamore, I'm going to add the following as a file called TreeRecogniserTest.cs to my UnitTests project:<br /> <br /><pre>
using NUnit.Framework;
using SherwoodForest.Sycamore.Core;
namespace SherwoodForest.Sycamore.UnitTests
{
[TestFixture]
public class TreeRecogniserTest
{
[Test]
public void ShouldRecogniseLarchAs1()
{
TreeRecogniser recogniser = new TreeRecogniser();
Assert.AreEqual(1, recogniser.Recognise(&quot;Larch&quot;));
}
}
}
</pre> <br />To implement this, I add Core as a Project Reference to UnitTests and create a new class in Core called TreeRecogniser:<br /> <br /><pre>
namespace SherwoodForest.Sycamore.Core
{
public class TreeRecogniser
{
public int Recognise(string treeName)
{
if (treeName == &quot;Larch&quot;)
{
return 1;
}
else
{
return 0;
}
}
}
}
</pre> <br />I can then run this test by using TestDriven.NET within the IDE, or by using the NUnit GUI and pointing it at src\UnitTests\bin\Debug\SherwoodForest.Sycamore.UnitTests.dll. The tests should pass in either case.<br /> <br />If we run our automated NAnt build, everything should compile OK, and you should be able to see each of the VS Projects compiling in their AutomatedDebug Build Configuration. The tests aren't run yet, but that's what we'll be looking at next time. Even so, we are still at a check-in point. We have 2 new project folders to add, but remember the exclusion rules (*.user, bin and obj). Being a Subversion command-line user, I like to use the the -N (non recursive) flag of svn add to make sure I can mark the svn:ignore property before all the temporary files get added.<br /> <br />Also, don't forget to check in tools\nunit or the new lib folder.<br /> <br />The current state of Sycamore is available here (link not available).<br /> <br />So let's wrap up this part then. We covered some new generic principles about projects and dependencies. We also looked at the specifics of using NUnit. Some concrete points to take away are: <br /><ul>
<li>Set DLL Names to be the same as the default namespace</li><li>Put your Unit Tests in a separate VS project called UnitTests</li><li>Save NUnit in your development tree in its own folder under tools</li><li>Put all DLLs your code depends on in a top level folder called lib. Theonly exceptions are system DLLs such as .NET Framework Libraries.</li>
</ul> <br /><a href="http://www.codeplex.com/treesurgeon/Wiki/View.aspx?title=DevelopmentTreePart7" class="externalLink">Next Section Unit Test Automation<span class="externalLinkIcon"></span></a><br />
</div>donnfelkerSat, 02 Jun 2007 23:17:02 GMTUPDATED WIKI: DevelopmentTreePart6 20070602111702PUPDATED WIKI: DevelopmentTreePart5http://www.codeplex.com/treesurgeon/Wiki/View.aspx?title=DevelopmentTreePart5&version=2<div class="wikidoc">
<h1>
Part 5 - Extending the Automated Build
</h1>In the last part we started using NAnt to automate a build for our project. In this part we'll add some more buildfunctionality. <br /> <br />When we added the compile target we used the &lt;solution&gt; task to compile our solution. However, we also specified which 'Build Configuration' to use. Build Configurations are a Visual Studio feature that allow you to build your project in different ways. The most common differences are between 'Debug' and 'Release' (2 configurations that Visual Studio always creates for you.) With a Debug build, the Visual Studio compiler is configured to create the .pdb files we use for ebugging (it gives us line numbers in exception stack traces, that kind of thing.) The 'Release' configuration doesn't have these files generated, but it does produce assemblies more geared towards production than development.<br /> <br />However, there are a whole bunch of other things you can configure for different build configurations. Right-click on aproject in Visual Studio, select Properties, then look at everything that appears under 'Configuration Properties' - all of those items can change for different Build Configurations. We're interested in the 'Output Path' property, and I'll explain why.<br /> <br />When we tell NAnt to compile the Debug Build Configuration of our solution, it tries to invoke the C# compiler to produce all the files that appear under the bin\Debug folder for each VS Project. There's a problem with this though - if we already have the Solution open in Visual Studio, VS will have locks on those files once they reach a certain size. That means that our NAnt compile will fail since it can't overwrite the assemblies. Anyway, it would be cleaner if we could separate out our 'automated' build from our 'interactive' build.<br /> <br />Thankfully, Build Configurations let us do this and still use the &lt;solution&gt; task. We do this by creating a new Build Configuration which we will just use for automated builds, and change where it outputs its files to. <br /> <br />To do this for Sycamore, I open up Visual Studio's 'Configuration Manager'(right click on the Solution, choose 'Configuration Manager'), and create a new configuration (open the drop-down menu, select '&lt;New...&gt;'). I'm going to call the new configuration AutomatedDebug and copy settings from the 'Debug' configuration (leave the 'create new project configuration(s)' box checked.) Close the dialog, and then bring up the properties for 'SycamoreConsole'. Select the 'Build' 'Configuration Properties' section, and make sure 'AutomatedDebug' is selected in the Configuration drop-down. Select the 'Output Path' box and change its value to '..\..\build\Debug\SycamoreConsole'. Switch Visual Studio back to the normal 'Debug' configuration which we use for interactive builds.<br /> <br />Finally, edit the build script, and change the 'configuration' argument of the<br />&lt;solution&gt; task to be AutomatedDebug. It should now look like this:<br /> <br /><pre>
&lt;target name=&quot;compile&quot;&gt;
&lt;solution solutionfile=&quot;src\Sycamore.sln&quot;
configuration=&quot;AutomatedDebug&quot; /&gt;
&lt;/target&gt;
</pre> <br />So what have we actually done here? If you run NAnt, you should see the following lines in your build output:<br /> <br /><pre>
compile:
[solution] Starting solution build.
[solution] Building 'SycamoreConsole' [AutomatedDebug] ...
</pre> <br />This tells us that NAnt is using the new Build Configuration. Now, look in the build\Debug\SycamoreConsole folder - you should see our compiled .exe file (and a .pdb file since we are compiling with debug options.) <br /> <br />That tells us what is happening, but why have we put these files in this directory? We use the build folder as another of our 'top level' project folders. It will contain all the build artifacts (assemblies, test reports, etc.) that we produce in the automated build. It will not contain any files that aren't generated by the build, so we don't need to check it into Source Control, and we can safely delete it whenever we want. Under build we will have a number of sub-folders, and so far we created one called Debug that will contain all of our Debug compilation artifacts. We put the artifacts for each VS Project in its own folder, with the same name as the VS Project it belongs to.<br /> <br />I said we could safely delete this folder, so let's add another NAnt target that will do this:<br /> <br /><pre>
&lt;target name=&quot;clean&quot;&gt;
&lt;delete dir=&quot;build&quot; if=&quot;${directory::exists('build')}&quot;/&gt;
&lt;/target&gt;
</pre> <br />I also said we didn't need to check the build folder into Source Control, so we can also add it to our list of excluded files. With Subversion, I do this by editting the svn:ignore property of the project root folder. <br /> <br />Finally for this part, we're going to create a batch file that developers can use to kick off the build. Its very simple, having just the following line:<br /> <br /><pre>
@tools\nant\NAnt.exe -buildfile:Sycamore.build %*
</pre> <br />I like calling this file 'go.bat' since the targets in the build script tend to be 'action' type words. Since its closely associated with the build script, put it in the project root. Note that we specify which build script to use - change this for your project. To use this file, just pass the target to run as an option, so to delete the build folder, just enter go clean.<br /> <br />Note that this batch file really is just meant as a bootstrap for convenience. I've seen plenty of projects use a combination of batch files and NAnt / Ant scripts to configure a build system. This is a bad idea for several reasons:<br /> <br /><ul>
<li>Batch files are significantly less manageable or powerful than NAnt,and tend to get very 'hacky' very quickly.</li><li>Your build behaviour really is one distinct concept and NAnt can handle all of it - splitting it across technologies isn't necessary.</li><li>Don't go down the road of having multiple batch files to launch builds for different environments. I'm yet to see a project that managed to pull this off in a clean, manageable way. Apart from anything else it is redundancy, and introduces more manual work and possiblities for error. Instead, use logic in your NAnt script to use different property values for different environments (hopefully I'll get on to build configuration and refactoring concepts in the future.)</li>
</ul> <br />If you run your default target, it should still be successful. If you have all your ignored files and directories setup correctly you should have 4 files to commit - the build script, the build script launcher (go.bat), the solution, and the VS Project for Sycamore Console. I'm going to check in these changes and call it a day for this part. The current state of Sycamore is available here. To summarise this part:<br /><ul>
<li>Use a top-level, transient, folder called build as the target folder of your automated build.</li><li>Create a new Visual Studio Build Configuration for your automated NAnt Builds. This Build Configuration should output to build.</li><li>Setup a clean target to delete your transient files.</li><li>Create a simple build bootstrap batch file.</li><li>Don't put any kind of build logic in this build bootstrap - leave that allin the NAnt build script.</li>
</ul>In the <a href="http://www.codeplex.com/treesurgeon/Wiki/View.aspx?title=DevelopmentTreePart6" class="externalLink">next part<span class="externalLinkIcon"></span></a> we'll start to add some unit tests.<br />
</div>donnfelkerSat, 02 Jun 2007 23:16:09 GMTUPDATED WIKI: DevelopmentTreePart5 20070602111609PUPDATED WIKI: DevelopmentTreePart4http://www.codeplex.com/treesurgeon/Wiki/View.aspx?title=DevelopmentTreePart4&version=2<div class="wikidoc">
<h1>
Part 4 - Adding an Automated Build
</h1>At this point we have a basic Visual Studio solution checked into Source Control. Now its time to automate how we build this solution.<br /> <br />Most of the time .NET developers will work solely within the Visual Studio environment, compiling their solution with the in-built compiler, and running tests using TestDriven.NET (more on testing to come...). But relying solely on Visual Studio as a way to produce build artifacts and run your tests isn't enough. For instance:<br /><ul>
<li>How do you run scheduled or triggered builds for your project? Using the command line version of Visual Studio (devenv.com) provides you with only basic command line features.</li><li>Visual Studio's 'pre-' and 'post-' build events provide some build scripting beyond just compiling code, but such scripting is limited in scope and expressiveness. </li>
</ul>The current 'de-facto' automated build tool for .NET projects is NAnt. NAnt is based on the Java build tool Ant and has similar strengths (integration with lots of useful tools, few dependencies) and also its weaknesses (being defined in XML means large build scripts quickly get hard to maintain). .NET 2 and Visual Studio 2005 will come with their own build scripting tool, MSBuild, which is very similar to NAnt. Investing in NAnt now should give you a build script you can easily convert to MSBuild later, should you want to. <br />NAnt is a tool that can be installed on every developers machine. However, I like to check NAnt into the project tree for some simple reasons:<br /><ul>
<li>It saves the manual steps of everyone copying it to their machine, and installing it. (Remember - manual steps take time and are a possible point of error.)</li><li>NAnt changes between versions, and such changes can effect the behaviour of a build. Making sure that everyone has the same version of NAnt when everyone is manually installing it can be tricky, and is time consuming when you want to upgrade the version of NAnt everyone uses.</li><li>Many projects use their own 'custom' NAnt tasks. Storing these in source control along with the project's own version of NAnt makes distribution to team members painless.</li><li>It is not a large tool, so the overhead of storing it in source control should not be a problem.</li>
</ul>To add NAnt to your project tree, first download and unpack its binary zip file (I'm going to use NAnt 0.85 RC1, available here.) Then, copy the bin folder to your project directory. I like to put all build-time tools in a subfolder of my project root called tools, and then put the contents of NAnt's bin folder in tools\nant. Before going any further, commit NAnt to your project's source control, making sure to include in the commit message the version of NAnt you are using. Later on, this will help you decide whether you want to upgrade to a new version.<br /> <br />You tell NAnt what to do using a build script. The standard for naming NAnt build scripts is ProjectName.build. The build script is a gateway into our project, so I like to save it in the root folder. You can edit your build script with Visual Studio - create it as a 'solution item' (Right click on the solution icon in Solution Explorer and choose Add new item... or Add existing item...). If you follow the instructions here and here you'll even get IntelliSense! (Thanks to Serge van e Oever and Craig Boland for writing it up.)<br /> <br />Our first NAnt build script will just compile our project. There are several ways to do this, and I'm going to use the &lt;solution&gt; task:<br /><pre>
&lt;?xml version=&quot;1.0&quot; ?&gt;
&lt;project name=&quot;nant&quot; default=&quot;compile&quot; xmlns=&quot;http://nant.sf.net/schemas/nant.xsd&quot;&gt;
&lt;target name=&quot;compile&quot;&gt;
&lt;solution solutionfile=&quot;src\Sycamore.sln&quot; configuration=&quot;debug&quot; /&gt;
&lt;/target&gt;
&lt;/project&gt;
</pre>I like to use the &lt;solution&gt; task for a couple of reasons:<br /><ul>
<li>For developers to work in Visual Studio we need to define how to compile our project in Visual Studio using its'references' system. &lt;solution&gt; lets us re-use all this work in 1 line of script. If we were to use the &lt;csc&gt; task instead we would need to maintain a separate set of compile definitions (which would be time-consuming and might not match the Solution / VS Project setup).</li><li>Using &lt;solution&gt; rather than the &lt;exec&gt; task calling out to devenv.com is less resource intensive, gives more appropriate feedback and also allows us to run builds on machines without Visual Studio installed (it just needs the .NET SDK.) If you have a problem using &lt;solution&gt; you can always quickly replace it with an &lt;exec&gt; to devenv.com</li>
</ul>To run your build, save the build script, open a command prompt and change to your project's root folder. Then just entertools\nant\NAnt. You should see output like:<br /><pre>
NAnt 0.85 (Build 0.85.1793.0; rc1; 28/11/2004)
Copyright (C) 2001-2004 Gerry Shaw
http://nant.sourceforge.net
Buildfile: file:///c:/devel/sycamore/Sycamore.build
Target(s) specified: compile
compile:
[solution] Starting solution build.
[solution] Building 'SycamoreConsole' [debug] ...
BUILD SUCCEEDED
Total time: 0.2 seconds.
</pre>Woohoo - a successful build! We have something new, that works, so submit the build script (and your changes to theSolution file that include the build script) to source control.<br /> <br />The current state of Sycamore is available here (link unavailable).<br /> <br />To summarise this part:<br /><ul>
<li>Add an automated build system to your project.</li><li>Use NAnt to automate your .NET 1.1 and earlier projects.</li><li>Check the NAnt distribution into your development tree.</li><li>Create a build script and save it in your development tree.</li><li>Use the &lt;solution&gt; task to compile your project.</li>
</ul>In the <a href="http://www.codeplex.com/treesurgeon/Wiki/View.aspx?title=DevelopmentTreePart5&amp;referringTitle=Home" class="externalLink">next part<span class="externalLinkIcon"></span></a> we'll be adding some more features to our automated build.<br />
</div>donnfelkerSat, 02 Jun 2007 23:15:28 GMTUPDATED WIKI: DevelopmentTreePart4 20070602111528P