Tuesday, April 17, 2007

 

Get Visual Studio 2005 Intellisense with Google Earth KML files

In fact, given a custom XSD schema definition file you can use this method to get Visual Studio 2005 intellisense with just about any XML based file, including NAnt and NAntContrib schemas (see here for a build task to generate the combined NAnt and NAntContrib schema).

1) Download kml21.xsd from http://code.google.com/apis/kml/schema/kml21.xsd and paste it into C:\Program Files\Microsoft Visual Studio 8\Xml\Schemas

2) Open regedit at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Editors\{fa3cd31e-987b-443a-9b81-186104e8dac1}\Extensions and add a DWORD value of "kml" with value '2A' (the value may vary depending on the editor). For other file extensions (such as .build) add the extension to the relevent editor at the \Editors\{GUID}\Extensions level.

3) In each .kml file, set the xml namespace to:


Updated: Jonathon Howey kindly pointed out that I missed the \Extensions part of the registry key, which I've now fixed. Thanks Jonathon.


    

Powered by Blogger