<?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>[Dot] Code Dump &#187; deployment</title>
	<atom:link href="http://www.dotcodedump.com/category/deployment/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dotcodedump.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Wed, 06 Jan 2010 12:27:53 +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>Web Deployment Primer</title>
		<link>http://www.dotcodedump.com/2009/08/web-deployment-primer/</link>
		<comments>http://www.dotcodedump.com/2009/08/web-deployment-primer/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 01:55:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ant]]></category>
		<category><![CDATA[FTP]]></category>
		<category><![CDATA[MAKE]]></category>
		<category><![CDATA[Phing]]></category>
		<category><![CDATA[Rake]]></category>
		<category><![CDATA[WGet]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[nant]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://blog.lintnernet.com/?p=64</guid>
		<description><![CDATA[A good deployment strategy is central to the care and feeding of any web application. There are a variety of different types of deployment strategies that are available, and many applications that can be used to automate web applications deployments.
This primer is broken up into major sections below.
Moving Files
If you are like me your web [...]]]></description>
			<content:encoded><![CDATA[<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_oJ89RnXa3zM/Spc5lmmkWtI/AAAAAAAAAXA/fTMmUvY_7hQ/s1600-h/Camels+in+car.jpg"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 249px;" src="http://4.bp.blogspot.com/_oJ89RnXa3zM/Spc5lmmkWtI/AAAAAAAAAXA/fTMmUvY_7hQ/s320/Camels+in+car.jpg" alt="" id="BLOGGER_PHOTO_ID_5374827998470232786" border="0" /></a>A good deployment strategy is central to the care and feeding of any web application. There are a variety of different types of deployment strategies that are available, and many applications that can be used to automate web applications deployments.</p>
<p>This primer is broken up into major sections below.</p>
<p><span style="font-weight: bold;font-size:130%;" >Moving Files</span></p>
<p>If you are like me your web server isn&#8217;t the same machine as your development PC at least I hope not! You will need a way to get files to your web servers.<span style="font-weight: bold;"></p>
<p>Push: </span>Push deployments are when files are transferred from the client to the server. An example of this would FTP, or many other file transfer protocol.  This involves opening up a client, and manually or automatically transferring the files from your PC to another computer. This could also involve transferring them using a network file system. FTP clients are included with most major operating systems.</p>
<p><span style="font-weight: bold;">Pull:</span> Triggering the server to download files from another location. An example of this would be using a third party program to download the files from web or ftp directory. WGet, SVN, or another similar program could be used.</p>
<p><a style="font-weight: bold;" href="http://www.gnu.org/software/wget/">WGet</a><span style="font-weight: bold;">:</span> Gnu WGet is free software for retrieving files over HTTP</p>
<p><a style="font-weight: bold;" href="http://filezilla-project.org/">FileZilla</a><span style="font-weight: bold;">:</span> Open source FTP client and server.</p>
<p><span style="font-weight: bold;font-size:130%;" >Source (Revision) Control</span></p>
<p>Source control is critical for being able to control releases, and code. Source control allows you to version your applications, and download a particular version from your source control repository. There are many flavors of source control. Personally I prefer Subversion (SVN). <a href="http://en.wikipedia.org/wiki/Revision_control">For information on source control.</a></p>
<p><a style="font-weight: bold;" href="http://subversion.tigris.org/">SVN</a><span style="font-weight: bold;">:</span> Open source, source control client and server.</p>
<p><a style="font-weight: bold;" href="http://www.nongnu.org/cvs/">CVS:</a> Open Source, been around since the 80&#8217;s, Concurrent Versioning System</p>
<p><a style="font-weight: bold;" href="http://mercurial.selenic.com/wiki/">Mercurial:</a> Open Source, Distributed Version Control in Python.</p>
<p><a style="font-weight: bold;" href="http://git-scm.com/">GIT:</a> Open Source, Distributed Version Control<br /><a href="http://bazaar-vcs.org/"><br /><span style="font-weight: bold;">Bazaar:</span></a> Open Source, Distributed Version Control<br /><a href="http://en.wikipedia.org/wiki/Microsoft_Visual_SourceSafe"><br /><span style="font-weight: bold;">Visual Source Safe:</span></a> Microsoft&#8217;s Legacy Version Control<br /><a href="http://en.wikipedia.org/wiki/Team_Foundation_Server"><br /><span style="font-weight: bold;">Team Foundation Server:</span></a> Microsoft&#8217;s Prefered Version Control, as well as project tracking</p>
<p><span style="font-weight: bold;font-size:130%;" >Automation</span></p>
<p>When I first started building websites. All my deployments were done manually over FTP, and it sucked! Then I started using a better FTP client, and guess what it still sucked! I dreaded deploying, it was error prone, and I looked like an idiot because I forgot a file here or there. It all changed when I started automating my deployments, and I haven&#8217;t looked back since.</p>
<p>Depending on what language, or platform you are developing on or for. It is very likely there is an automation application for you system. There is a large class of open source build automation applications based in some way off ANT for Java, which is java version of MAKE.</p>
<p>ANT and it&#8217;s derivatives are build scripts which are programmed using XML. Using the ANT XML files you can control file copying, running builds, unit tests, and a number of other deployment and build related tasks. Most of these applications support building custom tasks in their native language, so if it doesn&#8217;t support what you need it is very easy to build on top of these platforms.<br /><a href="http://www.gnu.org/software/make/"><br /></a><span style="font-weight: bold;"><a href="http://www.gnu.org/software/make/">Make</a>:</span> GNU Build Tool, best suited for compiling applications, custom file configuration.</p>
<p><a href="http://ant.apache.org/"><span style="font-weight: bold;">Ant:</span></a> Java Build Tool, best suited for building and deploying Java applications.<br /><a href="http://nant.sourceforge.net/"><br /><span style="font-weight: bold;">NAnt</span>:</a> .NET port of Ant, best suited for building and deploying .NET applications.</p>
<p><strong><a href="http://phing.info/trac/">Phing</a>: </strong>PHing <strong style="font-weight: normal;">I</strong>s <strong style="font-weight: normal;">N</strong>ot <strong style="font-weight: normal;">G</strong>NU make, best suited for deploying PHP applications.</p>
<p><a href="http://maven.apache.org/"><span style="font-weight: bold;">Maven:</span></a> Similar to Ant, but different application, it is network ready, and uses a system know as the Project Object Model.</p>
<p><a href="http://rake.rubyforge.org/"><span style="font-weight: bold;">Rake</span>:</a> Similar to Make for Ruby, and the config files use a Ruby syntax.</p>
<p><span style="font-size:130%;"><br /><span style="font-weight: bold;">Other Techniques and Tools</span></span></p>
<p><span style="font-weight: bold;">Divide and Conqueror </span></p>
<p>Divide applications deployments up into different sections, so it is very easy to pin point major errors. One example of this is dividing a compiled web applications into binary, and non binary changes, and then deploy one after the other.</p>
<p><span style="font-weight: bold;">Differential </span></p>
<p>Create a deployment of only the files that have changed since the last release. An example would be using source control to download files that have changed, and only deploying those. The advantages are it will reduce time during deployment. It may also have the issue of missing files, or other items.</p>
<p><span style="font-weight: bold;font-size:130%;" >Putting it all together</span></p>
<p>These are just some of the building blocks for deployment strategies. Building a consistent deployment structure will depend on the number of production, and QA environments that host an application. Sometimes you may not even have access to the production servers. These techniques, and tools are very flexible to support even the most rigorous of deployment structures.</p>
<p>The deployment process should never be a source of stress, and deployment processes should never be the source of errors. Using a consistent, and stable deployment process will reduce both stress and errors.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.dotcodedump.com/2009/08/web-deployment-primer/&amp;title=Web+Deployment+Primer" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.dotcodedump.com/2009/08/web-deployment-primer/&amp;title=Web+Deployment+Primer" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dotnetkicks.com/kick/?url=http://www.dotcodedump.com/2009/08/web-deployment-primer/&amp;title=Web+Deployment+Primer" rel="nofollow" title="Add to&nbsp;DotNetKicks"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/dotnetkicks.png" title="Add to&nbsp;DotNetKicks" alt="Add to&nbsp;DotNetKicks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dzone.com/links/add.html?description=Web+Deployment+Primer&amp;url=http://www.dotcodedump.com/2009/08/web-deployment-primer/&amp;title=Web+Deployment+Primer" rel="nofollow" title="Add to&nbsp;DZone"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/dzone.png" title="Add to&nbsp;DZone" alt="Add to&nbsp;DZone" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.dotcodedump.com/2009/08/web-deployment-primer/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.dotcodedump.com/2009/08/web-deployment-primer/&amp;title=Web+Deployment+Primer" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.dotcodedump.com/2009/08/web-deployment-primer/&amp;title=Web+Deployment+Primer" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.dotcodedump.com/2009/08/web-deployment-primer/&amp;title=Web+Deployment+Primer" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.dotcodedump.com/2009/08/web-deployment-primer/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Web+Deployment+Primer+@+http://www.dotcodedump.com/2009/08/web-deployment-primer/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.dotcodedump.com/2009/08/web-deployment-primer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Killer NAnt Scripting Template</title>
		<link>http://www.dotcodedump.com/2008/08/killer-nant-scripting-template/</link>
		<comments>http://www.dotcodedump.com/2008/08/killer-nant-scripting-template/#comments</comments>
		<pubDate>Tue, 12 Aug 2008 20:02:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[action]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[killer nant scripting]]></category>
		<category><![CDATA[nant]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://blog.lintnernet.com/?p=32</guid>
		<description><![CDATA[I created a NAnt template for developing NAnt scripts.  This template includes global variables, comments, different targets based on the deployment, job, action structure that I have talked about previously.
I have provided the entire text file listed below, and also a zip file with the template in a NAnt .build file for download.

DownloadTemplate
Template code:&#60;project [...]]]></description>
			<content:encoded><![CDATA[<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_oJ89RnXa3zM/SKHo2SseyMI/AAAAAAAAAMo/_-MY7e8XtcA/s1600-h/scaffold.jpg"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 305px; height: 229px;" src="http://3.bp.blogspot.com/_oJ89RnXa3zM/SKHo2SseyMI/AAAAAAAAAMo/_-MY7e8XtcA/s320/scaffold.jpg" alt="" id="BLOGGER_PHOTO_ID_5233720261410212034" border="0" /></a>I created a NAnt template for developing NAnt scripts.  This template includes global variables, comments, different targets based on the deployment, job, action structure that I have talked about previously.</p>
<p>I have provided the entire text file listed below, and also a zip file with the template in a NAnt .build file for download.
<div style="text-align: center;">
<div style="text-align: left;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://dotcodedump.googlepages.com/Killer_NAnt_Template.zip"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 46px; height: 46px;" src="http://4.bp.blogspot.com/_oJ89RnXa3zM/SKHhR-DRwBI/AAAAAAAAAMg/fTpvQVkIEws/s320/ip_icon_03_ButtonDown.png" alt="" id="BLOGGER_PHOTO_ID_5233711940811997202" border="0" /></a><a href="http://dotcodedump.googlepages.com/Killer_NAnt_Template.zip"><span style="font-size:130%;">Download<br />Template</span></a></p>
<pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"><span style="font-weight: bold;">Template code:</span><code>&lt;project name="Killer.NAnt.Template" default="Deploy.Target" basedir="." &gt;&lt;!-- Ian Lintner --&gt;&lt;!-- www.dotcodedump.com --&gt;

  &lt;!-- GLOBALS SECTION --&gt;  &lt;property name="Global.Debug" value="false" /&gt;    &lt;property name="Global.Project" value="[Project Name]" /&gt;  &lt;property name="Global.Email.From" value="[Email Address]" /&gt;  &lt;property name="Global.Email.To" value="[Email Address]" /&gt;  &lt;property name="Global.Email.Server" value="[Email Server]" /&gt;

  &lt;!-- DEPLOYMENT SECTION --&gt;

  &lt;target name="Deploy.Target" description="A generic deployment target" &gt;      &lt;echo message="**************************************************************" /&gt;      &lt;echo message="* === Begin Deploy Target 1 ===" /&gt;      &lt;echo message="**************************************************************" /&gt;      &lt;echo message="* Time: ${datetime::now()}" /&gt;      &lt;echo message="**************************************************************" /&gt;

      &lt;!--Put Deploy Specific Varaibles Here--&gt;

      &lt;!-- Put Jobs Here --&gt;      &lt;call target="Job.One" /&gt;

      &lt;echo message=""/&gt;      &lt;echo message=""/&gt;      &lt;echo message="**************************************************************" /&gt;      &lt;echo message="* === End Deploy Target 1 ===" /&gt;      &lt;echo message="**************************************************************" /&gt;      &lt;echo message="* Time: ${datetime::now()}" /&gt;      &lt;echo message="**************************************************************" /&gt;  &lt;/target&gt;

  &lt;!-- JOB SECTION --&gt;

  &lt;target name="Job.One" &gt;      &lt;echo message="**************************************************************" /&gt;      &lt;echo message="* -== Begin Task One==-" /&gt;      &lt;echo message="* Time: ${datetime::now()}" /&gt;      &lt;echo message="**************************************************************" /&gt;

      &lt;!--Put Job Specific Variables Here--&gt;

      &lt;!-- Put Actions Here --&gt;      &lt;call target="Action.One" /&gt;      &lt;call target="Action.Two" /&gt;

      &lt;echo message=""/&gt;      &lt;echo message=""/&gt;      &lt;echo message="**************************************************************" /&gt;      &lt;echo message="* -== End Task One==- " /&gt;      &lt;echo message="* Time: ${datetime::now()}" /&gt;      &lt;echo message="**************************************************************" /&gt;  &lt;/target&gt;

  &lt;!-- ACTION SECTION --&gt;

  &lt;target name="Action.One" &gt;      &lt;echo message="**************************************************************" /&gt;      &lt;echo message="* Begin Action One: ${datetime::now()}" /&gt;      &lt;echo message="**************************************************************" /&gt;

      &lt;!-- put tasks here --&gt;      &lt;echo message="   *** Task One ***"/&gt;

      &lt;echo message="**************************************************************" /&gt;      &lt;echo message="* End Action One: ${datetime::now()}" /&gt;      &lt;echo message="**************************************************************" /&gt;

  &lt;/target&gt;

  &lt;target name="Action.Two" &gt;      &lt;echo message="**************************************************************" /&gt;      &lt;echo message="* Begin Action Two: ${datetime::now()}" /&gt;      &lt;echo message="**************************************************************" /&gt;

      &lt;!-- put tasks here --&gt;      &lt;echo message="   *** Task Two ***"/&gt;

      &lt;echo message="**************************************************************" /&gt;      &lt;echo message="* End Action Two: ${datetime::now()}" /&gt;      &lt;echo message="**************************************************************" /&gt;  &lt;/target&gt;

&lt;/project&gt;

</code></pre>
<p></div>
</div>
<p><a href="http://www.dotcodedump.com/search/label/killer%20nant%20scripting">View All of the Killer Nant Scripting Articles</a></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.dotcodedump.com/2008/08/killer-nant-scripting-template/&amp;title=Killer+NAnt+Scripting+Template" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.dotcodedump.com/2008/08/killer-nant-scripting-template/&amp;title=Killer+NAnt+Scripting+Template" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dotnetkicks.com/kick/?url=http://www.dotcodedump.com/2008/08/killer-nant-scripting-template/&amp;title=Killer+NAnt+Scripting+Template" rel="nofollow" title="Add to&nbsp;DotNetKicks"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/dotnetkicks.png" title="Add to&nbsp;DotNetKicks" alt="Add to&nbsp;DotNetKicks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dzone.com/links/add.html?description=Killer+NAnt+Scripting+Template&amp;url=http://www.dotcodedump.com/2008/08/killer-nant-scripting-template/&amp;title=Killer+NAnt+Scripting+Template" rel="nofollow" title="Add to&nbsp;DZone"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/dzone.png" title="Add to&nbsp;DZone" alt="Add to&nbsp;DZone" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.dotcodedump.com/2008/08/killer-nant-scripting-template/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.dotcodedump.com/2008/08/killer-nant-scripting-template/&amp;title=Killer+NAnt+Scripting+Template" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.dotcodedump.com/2008/08/killer-nant-scripting-template/&amp;title=Killer+NAnt+Scripting+Template" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.dotcodedump.com/2008/08/killer-nant-scripting-template/&amp;title=Killer+NAnt+Scripting+Template" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.dotcodedump.com/2008/08/killer-nant-scripting-template/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Killer+NAnt+Scripting+Template+@+http://www.dotcodedump.com/2008/08/killer-nant-scripting-template/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.dotcodedump.com/2008/08/killer-nant-scripting-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Killer NAnt Scripting Quick Tip: &lt;Call&gt; vs. Depends</title>
		<link>http://www.dotcodedump.com/2008/07/killer-nant-scripting-quick-tip-call-vs-depends/</link>
		<comments>http://www.dotcodedump.com/2008/07/killer-nant-scripting-quick-tip-call-vs-depends/#comments</comments>
		<pubDate>Sat, 26 Jul 2008 10:37:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[action]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[killer nant scripting]]></category>
		<category><![CDATA[nant]]></category>

		<guid isPermaLink="false">http://blog.lintnernet.com/?p=27</guid>
		<description><![CDATA[Don&#8217;t use the depends script for everything it is bad form.  This is mistake I was doing when I first learned NAnt.  Depends has it place, but most times you should use &#60;call&#62; instead of declaring it depends in the target tag. depends should be reserved for use when something has to happen [...]]]></description>
			<content:encoded><![CDATA[<p>Don&#8217;t use the depends script for everything it is bad form.  This is mistake I was doing when I first learned NAnt.  Depends has it place, but most times you should use &lt;call&gt; instead of declaring it depends in the target tag. depends should be reserved for use when something has to happen first.</p>
<p>An example of this would be, I have to copy files, but I can&#8217;t until I backup my files.  You could put the back up call in depends.  If you use depends, you lose the ability to call variables in the current task.</p>
<p><span style="font-weight: bold;">How to use &lt;call&gt;:</span>
<pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"><code>&lt;!-- Using Depends --&gt;

&lt;target name="task.build" depends="action.build.project, action.copy.to.beta" &gt;

&lt;/target&gt;

&lt;!-- Using Call --&gt;

&lt;target name="task.build"&gt;   &lt;property name="action.source.dir" value="\\path\to\folder" /&gt;     &lt;property name="action.output.dir" value="\\path\to\folder" /&gt;     &lt;call target="action.build.project" /&gt;     &lt;call target="action.copy.to.beta /&gt;&lt;/target&gt;</code></pre>
<p>When we use depends, it has to happen before our script runs.  Call is more flexible, because you can then scope variables to use with the tasks you are calling, and it does not control the structure of your scripting.</p>
<p><a href="http://www.dotcodedump.com/search/label/killer%20nant%20scripting">View All of the Killer Nant Scripting Articles</a></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.dotcodedump.com/2008/07/killer-nant-scripting-quick-tip-call-vs-depends/&amp;title=Killer+NAnt+Scripting+Quick+Tip%3A+%26lt%3BCall%26gt%3B+vs.+Depends" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.dotcodedump.com/2008/07/killer-nant-scripting-quick-tip-call-vs-depends/&amp;title=Killer+NAnt+Scripting+Quick+Tip%3A+%26lt%3BCall%26gt%3B+vs.+Depends" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dotnetkicks.com/kick/?url=http://www.dotcodedump.com/2008/07/killer-nant-scripting-quick-tip-call-vs-depends/&amp;title=Killer+NAnt+Scripting+Quick+Tip%3A+%26lt%3BCall%26gt%3B+vs.+Depends" rel="nofollow" title="Add to&nbsp;DotNetKicks"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/dotnetkicks.png" title="Add to&nbsp;DotNetKicks" alt="Add to&nbsp;DotNetKicks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dzone.com/links/add.html?description=Killer+NAnt+Scripting+Quick+Tip%3A+%26lt%3BCall%26gt%3B+vs.+Depends&amp;url=http://www.dotcodedump.com/2008/07/killer-nant-scripting-quick-tip-call-vs-depends/&amp;title=Killer+NAnt+Scripting+Quick+Tip%3A+%26lt%3BCall%26gt%3B+vs.+Depends" rel="nofollow" title="Add to&nbsp;DZone"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/dzone.png" title="Add to&nbsp;DZone" alt="Add to&nbsp;DZone" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.dotcodedump.com/2008/07/killer-nant-scripting-quick-tip-call-vs-depends/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.dotcodedump.com/2008/07/killer-nant-scripting-quick-tip-call-vs-depends/&amp;title=Killer+NAnt+Scripting+Quick+Tip%3A+%26lt%3BCall%26gt%3B+vs.+Depends" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.dotcodedump.com/2008/07/killer-nant-scripting-quick-tip-call-vs-depends/&amp;title=Killer+NAnt+Scripting+Quick+Tip%3A+%26lt%3BCall%26gt%3B+vs.+Depends" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.dotcodedump.com/2008/07/killer-nant-scripting-quick-tip-call-vs-depends/&amp;title=Killer+NAnt+Scripting+Quick+Tip%3A+%26lt%3BCall%26gt%3B+vs.+Depends" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.dotcodedump.com/2008/07/killer-nant-scripting-quick-tip-call-vs-depends/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Killer+NAnt+Scripting+Quick+Tip%3A+%26lt%3BCall%26gt%3B+vs.+Depends+@+http://www.dotcodedump.com/2008/07/killer-nant-scripting-quick-tip-call-vs-depends/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.dotcodedump.com/2008/07/killer-nant-scripting-quick-tip-call-vs-depends/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Killer Nant Scripting Part 7: Custom Tasks in C#</title>
		<link>http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-7-custom-tasks-in-c/</link>
		<comments>http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-7-custom-tasks-in-c/#comments</comments>
		<pubDate>Thu, 24 Jul 2008 12:46:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[action]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[killer nant scripting]]></category>
		<category><![CDATA[nant]]></category>

		<guid isPermaLink="false">http://blog.lintnernet.com/?p=25</guid>
		<description><![CDATA[You can use NAnt with either VB or C# to write your own custom tasks.  This truly is a killer feature, once you are able to implement custom tasks in C# you can make NAnt do almost anything.  This allows you to address some of NAnts weaknesses, primarly it is a build and [...]]]></description>
			<content:encoded><![CDATA[<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.marshallamps.com/images/resources/lessons_online/lesson_09/l9csharpminor_r1_c1.jpg"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 141px; height: 141px;" src="http://www.marshallamps.com/images/resources/lessons_online/lesson_09/l9csharpminor_r1_c1.jpg" alt="" border="0" /></a>You can use NAnt with either VB or C# to write your own custom tasks.  This truly is a killer feature, once you are able to implement custom tasks in C# you can make NAnt do almost anything.  This allows you to address some of NAnts weaknesses, primarly it is a build and deployment scripting platform, and not a programming platform.  Using a object oriented language in conjunction makes it truly robust, and ultimately usable technology.</p>
<p>Extending NAnt one step further you can even create your own custom NAnt assemblies (.dll), for truly flexible tasks.  We will focus on doing it in the script, becuase the name of the game is getting it done quickly, without alot of overhead, it&#8217;s scripting damnit.  If we wanted something else we would just fire up Visual Studio and create a application to do it for us.  If you find your self doing extensive amount of programming in NAnt you may want to reconsider NAnt for the task at hand.</p>
<div width="100%">NAnt scripting in .NET:</p>
<p>First a script element needs to be created outside of a NAnt task using the needed C#.</p>
<pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"><code>&lt;script language="C#" prefix="demo" &gt;&lt;code&gt;&lt;![CDATA[ [Function("generateguid")]public static string getguid(  ) {

   return Guid.NewGuid().ToString; }]]&gt;&lt;/code&gt;&lt;/script&gt;

&lt;target name="Action.Print.Demo"&gt;&lt;echo message="*** My Guid is: ${demo::generateguid()} ***" /&gt;&lt;/target&gt;

</code></pre>
<p>Then the task is called by calling the prefix: &#8216;demo&#8217; and the NAnt function name: &#8216;generateguid&#8217;.  Many C# actions can be called this way, I usually use them for generating output, or other tasks nant is not great at.</p>
<p><a href="http://www.dotcodedump.com/search/label/killer%20nant%20scripting">View All of the Killer Nant Scripting Articles</a></p>
</div>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-7-custom-tasks-in-c/&amp;title=Killer+Nant+Scripting+Part+7%3A+Custom+Tasks+in+C%23" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-7-custom-tasks-in-c/&amp;title=Killer+Nant+Scripting+Part+7%3A+Custom+Tasks+in+C%23" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dotnetkicks.com/kick/?url=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-7-custom-tasks-in-c/&amp;title=Killer+Nant+Scripting+Part+7%3A+Custom+Tasks+in+C%23" rel="nofollow" title="Add to&nbsp;DotNetKicks"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/dotnetkicks.png" title="Add to&nbsp;DotNetKicks" alt="Add to&nbsp;DotNetKicks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dzone.com/links/add.html?description=Killer+Nant+Scripting+Part+7%3A+Custom+Tasks+in+C%23&amp;url=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-7-custom-tasks-in-c/&amp;title=Killer+Nant+Scripting+Part+7%3A+Custom+Tasks+in+C%23" rel="nofollow" title="Add to&nbsp;DZone"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/dzone.png" title="Add to&nbsp;DZone" alt="Add to&nbsp;DZone" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-7-custom-tasks-in-c/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-7-custom-tasks-in-c/&amp;title=Killer+Nant+Scripting+Part+7%3A+Custom+Tasks+in+C%23" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-7-custom-tasks-in-c/&amp;title=Killer+Nant+Scripting+Part+7%3A+Custom+Tasks+in+C%23" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-7-custom-tasks-in-c/&amp;title=Killer+Nant+Scripting+Part+7%3A+Custom+Tasks+in+C%23" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-7-custom-tasks-in-c/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Killer+Nant+Scripting+Part+7%3A+Custom+Tasks+in+C%23+@+http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-7-custom-tasks-in-c/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-7-custom-tasks-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Killer Nant Scripting Part 6: Logging</title>
		<link>http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-6-logging/</link>
		<comments>http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-6-logging/#comments</comments>
		<pubDate>Fri, 18 Jul 2008 13:14:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[action]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[killer nant scripting]]></category>
		<category><![CDATA[nant]]></category>

		<guid isPermaLink="false">http://blog.lintnernet.com/?p=23</guid>
		<description><![CDATA[Demistyfiying the Black Box
Logging is logical extension of creating usable output from any type of computer program, be it a windows GUI, a web application, or even a script.  Logging allows us to get into the nitty gritty about important steps our programs are executing.  This goes one step further into creating really [...]]]></description>
			<content:encoded><![CDATA[<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.fs.fed.us/wildecology/decaid/decaid_background/op_logging_bigload.jpg"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px;" src="http://www.fs.fed.us/wildecology/decaid/decaid_background/op_logging_bigload.jpg" alt="" border="0" /></a><span style="font-weight: bold;">Demistyfiying the Black Box</span></p>
<p>Logging is logical extension of creating usable output from any type of computer program, be it a windows GUI, a web application, or even a script.  Logging allows us to get into the nitty gritty about important steps our programs are executing.  This goes one step further into creating really polished, functional scripts.  Once we can track what is going on we remove some of the mystery of what is going on.</p>
<p>There are two ways to log, one is through the command line, and the other is the <record> task made available through the <a href="http://nantcontrib.sourceforge.net/">NAnt contrib library</a>.  The <record> task allows us to save portions of our scripts to files.</p>
<p>To call the record task, we pass it the path of the log file, which we specified with a global variable for the directory, and local action variable and the parameter action=&#8221;start&#8221; to start the recording task, and then we call it again after the actions we wish to log, and but with the action=&#8221;Close&#8221; property.
<div width="100%">
<pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); line-height: 14px; width: 100%;font-family:Andale Mono,Lucida Console,Monaco,fixed,monospace;font-size:12px;"><code><span style="font-weight: bold;">Record Task Example:</span>&lt;!-- Start Logging --&gt;&lt;record name="${global.log.dir}\${action.log.file}" level="Info" action="Start"/&gt;

&lt;someaction .../&gt;

&lt;!-- End Logging --&gt;&lt;record name="${global.log.dir}\${action.log.file}" action="Close"/&gt;

</code></pre>
<p></div>
<p>If you wish to log without using the NAnt contrib library, you can use a simple solution, at the command line redirect the output using <span style="font-weight: bold;">&#8216;>&#8217;</span> .  We can redirect the output to a file and save it.</p>
<p>Run our script from the command line normally, but then append > &#8220;mylog.txt&#8221; to log the output.</p>
<p><span style="font-weight: bold;">Use <span style="font-weight: bold;">-e</span> (emacs ouput)</span> to remove some of the excessive NAnt output artifacts.</p>
<p><record><record>
<pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"><code>C:\> nant /f:buildscript.build -e /v:+ all &gt; "mylog.txt"</code></pre>
<p></record></record>This will redirect the output of the build script to mylog.txt.</p>
<p><a href="http://www.dotcodedump.com/search/label/killer%20nant%20scripting">View All of the Killer Nant Scripting Articles</a></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-6-logging/&amp;title=Killer+Nant+Scripting+Part+6%3A+Logging" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-6-logging/&amp;title=Killer+Nant+Scripting+Part+6%3A+Logging" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dotnetkicks.com/kick/?url=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-6-logging/&amp;title=Killer+Nant+Scripting+Part+6%3A+Logging" rel="nofollow" title="Add to&nbsp;DotNetKicks"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/dotnetkicks.png" title="Add to&nbsp;DotNetKicks" alt="Add to&nbsp;DotNetKicks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dzone.com/links/add.html?description=Killer+Nant+Scripting+Part+6%3A+Logging&amp;url=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-6-logging/&amp;title=Killer+Nant+Scripting+Part+6%3A+Logging" rel="nofollow" title="Add to&nbsp;DZone"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/dzone.png" title="Add to&nbsp;DZone" alt="Add to&nbsp;DZone" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-6-logging/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-6-logging/&amp;title=Killer+Nant+Scripting+Part+6%3A+Logging" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-6-logging/&amp;title=Killer+Nant+Scripting+Part+6%3A+Logging" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-6-logging/&amp;title=Killer+Nant+Scripting+Part+6%3A+Logging" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-6-logging/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Killer+Nant+Scripting+Part+6%3A+Logging+@+http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-6-logging/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-6-logging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Killer Nant Scripting Part 5: Echos and Outputs</title>
		<link>http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-5-echos-and-outputs/</link>
		<comments>http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-5-echos-and-outputs/#comments</comments>
		<pubDate>Tue, 15 Jul 2008 18:31:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[action]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[killer nant scripting]]></category>
		<category><![CDATA[nant]]></category>

		<guid isPermaLink="false">http://blog.lintnernet.com/?p=20</guid>
		<description><![CDATA[Formatted and human readable output is critical in creating reusable Nant scripts.    Displaying formatted script output makes the script makes it more useful, and usable. It allows us to display everything, and highlight the important, and it gives our scripts a polished look.
If you are going to be writing one off scripts, [...]]]></description>
			<content:encoded><![CDATA[<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://ben.bacchus.com.au/vpcblog/images/zork3.PNG"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px;" src="http://ben.bacchus.com.au/vpcblog/images/zork3.PNG" alt="" border="0" /></a>Formatted and human readable output is critical in creating reusable Nant scripts.    Displaying formatted script output makes the script makes it more useful, and usable. It allows us to display everything, and highlight the important, and it gives our scripts a polished look.</p>
<p><span>If you are going to be writing one off scripts, this could be considered a &#8220;optional&#8221; addition to Nant scripting.</span><span style="font-style: italic;"><br /></span><br />Displaying information <span style="font-style: italic;">well</span> is one the most difficult tasks we as developers face, and with scripting it is very easy to ignore this section.  Nant scripts with out well formatted output can be black boxes, that just do a task, and it&#8217;s magic.  Formatted output and display allows the person using the script to view what is going on, and say &#8220;oh it got stuck when copying this file&#8221;, &#8220;This step was missed&#8221;.</p>
<p>Time to get to the scripting.</p>
<p>The output command in Nant is <span style="font-weight: bold;">echo</span>:
<pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"><code>&lt;echo message="*** I am a formatted Message ***" /&gt;</code></pre>
<p>Using echo we can create nice output structures. Here is an example of output to use at the start of an action, and display an important variable called source:
<pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"><code>&lt;echo message="**************************************************************" /&gt;&lt;echo message="* Task: ${task.name} " /&gt;&lt;echo message="*" /&gt;&lt;echo message="* Starting Action: ${action.name}: ${datetime::now()}" /&gt;&lt;echo message="* Source: ${action.source}" /&gt;&lt;echo message="*" /&gt;&lt;echo message="**************************************************************" /&gt;</code></pre>
<p>We can display information while scripting, that is more useful to the person who needs to run the script.  I mostly use these for status updates, and displaying important variables in my scripts, so I can locate exactly what happened, and what is wrong.  Good output is rarely appreciated till there is a problem with the script, and exactly what went wrong has to be figured out.</p>
<p><a href="http://www.dotcodedump.com/search/label/killer%20nant%20scripting">View All of the Killer Nant Scripting Articles</a></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-5-echos-and-outputs/&amp;title=Killer+Nant+Scripting+Part+5%3A+Echos+and+Outputs" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-5-echos-and-outputs/&amp;title=Killer+Nant+Scripting+Part+5%3A+Echos+and+Outputs" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dotnetkicks.com/kick/?url=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-5-echos-and-outputs/&amp;title=Killer+Nant+Scripting+Part+5%3A+Echos+and+Outputs" rel="nofollow" title="Add to&nbsp;DotNetKicks"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/dotnetkicks.png" title="Add to&nbsp;DotNetKicks" alt="Add to&nbsp;DotNetKicks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dzone.com/links/add.html?description=Killer+Nant+Scripting+Part+5%3A+Echos+and+Outputs&amp;url=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-5-echos-and-outputs/&amp;title=Killer+Nant+Scripting+Part+5%3A+Echos+and+Outputs" rel="nofollow" title="Add to&nbsp;DZone"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/dzone.png" title="Add to&nbsp;DZone" alt="Add to&nbsp;DZone" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-5-echos-and-outputs/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-5-echos-and-outputs/&amp;title=Killer+Nant+Scripting+Part+5%3A+Echos+and+Outputs" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-5-echos-and-outputs/&amp;title=Killer+Nant+Scripting+Part+5%3A+Echos+and+Outputs" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-5-echos-and-outputs/&amp;title=Killer+Nant+Scripting+Part+5%3A+Echos+and+Outputs" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-5-echos-and-outputs/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Killer+Nant+Scripting+Part+5%3A+Echos+and+Outputs+@+http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-5-echos-and-outputs/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-5-echos-and-outputs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Killer Nant Scripting Part 4</title>
		<link>http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-4/</link>
		<comments>http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-4/#comments</comments>
		<pubDate>Wed, 09 Jul 2008 19:22:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[action]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[killer nant scripting]]></category>
		<category><![CDATA[nant]]></category>

		<guid isPermaLink="false">http://blog.lintnernet.com/?p=19</guid>
		<description><![CDATA[Targets Level 3: Actions
I finally have floated back to earth after my head trip about simplicity.
Actions are the meat of my Nant scripting methodology.  This is the section where I break down the tasks into their atomic parts.  This is where we will be telling nant what to do.
One of the standard tasks [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-weight: bold;font-size:130%;" >Targets Level 3:</span><span style="font-size:130%;"><span style="font-weight: bold;"> Actions</p>
<p></span></span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://loser.miniwini.com/album/images/Led.Zeppelin.-.Four.jpg"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px;" src="http://loser.miniwini.com/album/images/Led.Zeppelin.-.Four.jpg" alt="" border="0" /></a>I finally have floated back to earth after my head trip about simplicity.</p>
<p>Actions are the meat of my Nant scripting methodology.  This is the section where I break down the tasks into their atomic parts.  This is where we will be telling nant what to do.</p>
<p>One of the standard tasks that usually needs to be accomplished is moving files from one directory to another.  The biggest challenge is writing somewhat generic tasks.  One example is a task to move just a web project without the code behinds or other files unnecessary for our web application to run.</p>
<p>These two tasks are examples of copy tasks I could use in deploying a web project, they both use the same variables for input and output.  They accomplish one task such as copying aspx and ascx files to a directory, and they could be used as is in other projects, or if necessary slightly modified.</p>
<pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"><code>  &lt;target name="action.copy.pages"&gt;      &lt;mkdir dir="${action.destination.dir}" /&gt;      

      &lt;copy todir="${action.destination.dir}" overwrite="true" &gt;          &lt;fileset basedir="${action.source.dir}"&gt;              &lt;include name="**/*.aspx" /&gt;              &lt;include name="**/*.ascx" /&gt;          &lt;/fileset&gt;      &lt;/copy&gt;

      &lt;echo message="COPY PAGES AND CONTROLS: SUCCESS   ${datetime::now()}" /&gt;  &lt;/target&gt;

  &lt;target name="action.copy.resources"&gt;      &lt;mkdir dir="${action.destination.dir}" /&gt;      

      &lt;copy todir="${action.destination.dir}" overwrite="true" &gt;          &lt;fileset basedir="${action.source.dir}"&gt;              &lt;include name="**/*.htm" /&gt;              &lt;include name="**/*.gif" /&gt;              &lt;include name="**/*.jpg" /&gt;              &lt;include name="**/*.png" /&gt;              &lt;include name="**/*.css" /&gt;              &lt;include name="**/*.js" /&gt;          &lt;/fileset&gt;      &lt;/copy&gt;

      &lt;echo message="COPY RESOURCES COMPLETE: SUCCESS   ${datetime::now()}" /&gt;  &lt;/target&gt;

</code></pre>
<p><a href="http://www.dotcodedump.com/search/label/killer%20nant%20scripting">View All of the Killer Nant Scripting Articles</a></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-4/&amp;title=Killer+Nant+Scripting+Part+4" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-4/&amp;title=Killer+Nant+Scripting+Part+4" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dotnetkicks.com/kick/?url=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-4/&amp;title=Killer+Nant+Scripting+Part+4" rel="nofollow" title="Add to&nbsp;DotNetKicks"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/dotnetkicks.png" title="Add to&nbsp;DotNetKicks" alt="Add to&nbsp;DotNetKicks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dzone.com/links/add.html?description=Killer+Nant+Scripting+Part+4&amp;url=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-4/&amp;title=Killer+Nant+Scripting+Part+4" rel="nofollow" title="Add to&nbsp;DZone"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/dzone.png" title="Add to&nbsp;DZone" alt="Add to&nbsp;DZone" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-4/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-4/&amp;title=Killer+Nant+Scripting+Part+4" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-4/&amp;title=Killer+Nant+Scripting+Part+4" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-4/&amp;title=Killer+Nant+Scripting+Part+4" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-4/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Killer+Nant+Scripting+Part+4+@+http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-4/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.dotcodedump.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.dotcodedump.com/2008/07/killer-nant-scripting-part-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
