Edit NAnt file in Visual Studio .NET
I use NAnt recently to create build files for my current project. One of the issue I found is how to edit the NAnt build file with intellisense. Actually we can take advantage of the XML schema file come with NAnt to put intellisense feature into Visual Studio.NET. Here is the process:
1. After unzipping NAnt, look for schema folder. Copy nant.xsd into your visual studio .net installation folder, C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Packages\schemas\xml
2. Open nant.xsd and find out the defined namespeace, which is “
xmlns=http://nant.sf.net/schemas/nant.xsd“.
3. Add this name space into NAnt build fild, like that:
4. In visual Studio, right click NAnt build file, select open with “HTML/XML Editor (Default)”.
5. All set. You should be able to use intellisense now.