To setup nant intellisense in VS 2005 you can copy the schema from the install to the Visual Studio Install\xml\schema directory, however this won’t get all available tasks. As such, I prefer to create a nant file which calls the nantschema task (http://nant.sourceforge.net/release/0.85/help/tasks/nantschema.html). This task requires an output attribute be set, which I just set to my Visual Studio Install\xml\schema directory. Below is the build script I use:
<?xml version="1.0" encoding="utf-8"?> <project name="Build nant schema to VS 2005" default="build" basedir="."> <target name="build"> <nantschema
output="C:\Program Files\Microsoft Visual Studio 8\Xml\Schemas\NAnt.xsd"
target-ns="http://tempuri.org/nant-donotuse.xsd" /> </target> </project>
You can run this after updating Nant or adding contrib projects to your installation and get the latest tasks.
Finally, in your other build files add the xmlns attribute to the project element pointing to the name space you used as the target-ns, http://tempuri.org/nant-donotuse.xsd in the above example. You may also need to tell VS to open .build files with the xml editor, you can do this by right clicking on the .build file and choosing ‘open with’.