I've been writing nant build files today. These files use an extension of “.build” and they contain XML data.... I'd like to use my normal XML editor, VS.NET IDE to manipulate these files, but the IDE does not recognize a “.build” file as an XML file....
Here's a simple way to tell the IDE that a “.build” or any other file extension you choose is an XML type file....
Open the registry (regedit) and navigate to:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1\Editors\{C76D83F8-A489-11D0-8195-00A0C91BBEE3}\Extensions
If you look at the Default tag on {C76D83F8-A489-11D0-8195-00A0C91BBEE3} you will see this is the Html Editor settings. Looking at the other extensions in the Extensions list you'll see all the common markup langauges, html, xml, xsl, xslt, etc.
Just add a new DWORD value under Extensions (with Extensions selected in the left pane, right-click in the right pane and choose New>DWORD Value.
Enter the extension you want as the name of the new value, double-click and set the Value Data to hex 28 (decimal 40).
The next time you start your VS.NET IDE it will recognize files of the new extension and markup, color, and whatnot appropriately....
-Andy