<?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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule">

<channel>
	<title>techencoder &#187; NAnt</title>
	<atom:link href="http://techencoder.com/index.php/tag/nant/feed/" rel="self" type="application/rss+xml" />
	<link>http://techencoder.com</link>
	<description>Technical ideas in a human readable format</description>
	<lastBuildDate>Wed, 01 Feb 2012 17:19:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>		<item>
		<title>Intellisense for NAnt Build Files (VS 2005 and 2008)</title>
		<link>http://techencoder.com/index.php/2010/01/vs-intellisense-for-nant/</link>
		<comments>http://techencoder.com/index.php/2010/01/vs-intellisense-for-nant/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 05:05:06 +0000</pubDate>
		<dc:creator>r.claypool</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[NAnt]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://techencoder.com/?p=1050</guid>
		<description><![CDATA[Step 1. Make VS recognize a .build file as an XML file. Right-click a .build file in the &#8220;Solution Explorer&#8221; and select &#8220;Open With &#8230;&#8221; In the &#8220;Open With&#8221; dialog, select &#8220;XML Editor&#8221; and &#8220;Set as Default&#8221; Step 2: Enable intellisense for .build files. Get the schema file for NAnt: Version 0.86 Beta 1 is at [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://techencoder.com/wp-content/uploads/2010/01/nant.jpg" alt="nant" title="nant" width="600" height="106" class="aligncenter size-full wp-image-1100" /></p>
<h4>Step 1. Make VS recognize a .build file as an XML file.</h4>
<div>
<ol>
<li>Right-click a .build file in the &#8220;Solution Explorer&#8221; and select &#8220;Open With &#8230;&#8221;</li>
<li>In the &#8220;Open With&#8221; dialog, select &#8220;XML Editor&#8221; and &#8220;Set as Default&#8221;</li>
</ol>
<p><img class="aligncenter size-full wp-image-1053" title="vs-2005-2008-open-with-dialog" src="http://techencoder.com/wp-content/uploads/2010/01/vs-2005-2008-open-with-dialog.png" alt="vs-2005-2008-open-with-dialog" width="600" height="244" /></div>
<h4>Step 2: Enable intellisense for .build files.</h4>
<p>Get the schema file for NAnt:</p>
<ul>
<li>Version 0.86 Beta 1 is at <a title="XSD Schema for NAnt" href="http://nant.sf.net/release/0.86-beta1/nant.xsd" target="_blank">http://nant.sf.net/release/0.86-beta1/nant.xsd</a></li>
<li>Version 0.85 is at <a title="XSD Schema for NAnt" href="http://nant.sf.net/release/0.86-beta1/nant.xsd" target="_blank">http://nant.sf.net/release/0.85/nant.xsd</a></li>
</ul>
<p>Copy it to the &#8220;<em>xml\Schemas</em>&#8221; subdirectory of your VS installation:</p>
<div>
<ul>
<li>Note that you can check this path via <em>Tools &gt; Options &gt; Text Editor &gt; XML &gt; Miscellaneous</em></li>
</ul>
<p><img class="aligncenter size-full wp-image-1066" title="schema-location-option" src="http://techencoder.com/wp-content/uploads/2010/01/schema-location-option.png" alt="schema-location-option" width="600" height="347" /></div>
<div>Specify the schema to use within Visual Studio:</div>
<div>
<ul>
<li>Open the file so that it appears in a Visual Studio editor window.</li>
<li>Click the file&#8217;s editor window (to activate it) and specify the schema to use (within the &#8220;Properties&#8221; window).<br />
<img class="aligncenter size-full wp-image-1057" title="change-schema-properties" src="http://techencoder.com/wp-content/uploads/2010/01/change-schema-properties.png" alt="change-schema-properties" width="600" height="148" /></li>
</ul>
<ul>
<li>Note that this dialog has changed from VS 2005 to 2008:</li>
</ul>
<p style="text-align: center;"><img class="size-full wp-image-1058" title="xsd-schemas-vs-2005" src="http://techencoder.com/wp-content/uploads/2010/01/xsd-schemas-vs-2005.png" alt="Visual Studio 2005" width="600" height="231" /><br />
(VS 2005)</p>
<p><img class="size-full wp-image-1059" title="xsd-schemas-vs-2008" src="http://techencoder.com/wp-content/uploads/2010/01/xsd-schemas-vs-2008.png" alt="Visual Studio 2008" width="600" height="235" /><br />
(VS 2008)</p>
<p>If all of that is not enough,  make sure to <strong>enter an xmlns and make sure it is equal to the xmlns specified in the XSD schema</strong>. </p>
<p>
!!!!! Even though the schema is available at <a title="NANT XML Schema" href="http://nant.sourceforge.net/release/0.86-beta1/nant.xsd" target="_blank">http://nant.sf.net/release/0.86-beta1/nant.xsd</a> and <a title="NANT XML Schema" href="http://nant.sourceforge.net/release/0.86-beta1/nant.xsd" target="_blank">http://nant.sourceforge.net/release/0.86-beta1/nant.xsd</a>, you must reference the former url in your build file because it is the one referenced in nant.xsd. !!!!!</p>
<p>Here is an example of what I mean:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;project</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://nant.sf.net/release/0.86-beta1/nant.xsd&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;MyProject&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #808080; font-style: italic;">&lt;!-- stuff here --&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/project<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Hope that helps someone.  Happy Programming!</p></div>
<hr/>
<div xmlns:cc="http://creativecommons.org/ns#" about="http://www.flickr.com/photos/kubina/521327318/">
Attribution: The <a href='http://www.flickr.com/photos/kubina/521327318/'>ant photo</a> in this post is used with permission (<a rel="license" href="http://creativecommons.org/licenses/by-sa/2.0/">CC BY-SA 2.0</a>) by <a rel="cc:attributionURL" href="http://www.flickr.com/photos/kubina/">Jeff Kubina</a></div>
]]></content:encoded>
			<wfw:commentRss>http://techencoder.com/index.php/2010/01/vs-intellisense-for-nant/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

