After years of developing code using VS.NET IntelliSense feature its pretty painful to write CAML (Collaborative Application Markup Language) in XML files where IntelliSense is not available by default.
However now there is a workaround to get IntelliSense for CAML by linking it to the right XSD file. Even better John Holliday recently released a free tool CAML.NET to solve this problem and provides additional features.
This solution will load the XSD whenever a new XML file referencing it is opened.
Open the Catalog.xml file from the VS.NET installation folder. If you are using VS.NET 2008 Catalog.xml will be available in C:\Program Files\Microsoft Visual Studio 9.0\Xml\Schemas.
To create a new reference to wss.xsd, copy and paste the code below:
<Schema href="C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/12/TEMPLATE/XML/wss.xsd"
targetNamespace="http://schemas.microsoft.com/sharepoint/" />
Restart your Visual Studio.NET instance and and you will have IntelliSense available when working with CAML files.
I am using this tool from last 3 weeks and finding it very useful when editing CAML files. It provide more extensive IntelliSense than you get with reference the wss.xsd(Option 1).
CAML.NET IntelliSense tool extend the core schemas in two ways:
CAML.NET IntelliSense download package includes an MSI installer that copies the extended schemas into the local Visual Studio schema cache, so all you have to do is run the installer and then close and re-open Visual Studio. The current version handles both Visual Studio 2005 and 2008.
SharePoint – Add IntelliSense when editing CAML files in WSS v3 / MOSS 2007 You might be interested in:
Discussion
No comments for “SharePoint – Add IntelliSense when editing CAML files in WSS v3 / MOSS 2007”
Post a comment