Edit NAnt build file in Visual Studio 2005 with intellisense

  1. install lastest nant from http://nant.sourceforge.net/. Install help: http://nant.sourceforge.net/release/latest/help/introduction/installation.html or search nant.bat.
  2. Copy schema file from nant/schema/nant.xsd to C:\Program Files\Microsoft Visual Studio 8\Common7\Packages\schemas\xml\nant.xsd
  3. Navigate to  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Editors\{412B8852-4F21-413B-9B47-0C9751D3EBFB}\Extensions
  4. Add a DWORD name of build and value of 29 hex.
  5. Create the build file by convention it’s named as project_name.build.
  6. Use Visual Studio to open the file and add the following:
    <?xml version=”1.0″?>
    <project name=”your_project_name” default=”build” basedir=”.” xmlns=”http://nant.sf.net/release/0.85/nant.xsd”>
    </project> Make sure the xmlns attribute matches your namespace in the nand.xsd file.
  7. Save and close it then open it again. Now you should have intellisense

Leave a Reply