Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
Visual How Tos
 Configuring IntelliSense with CAML ...

  Switch on low bandwidth view
Community Content
In this section
Statistics Annotations (0)
Configuring IntelliSense with CAML Files When Developing for Windows SharePoint Services 3.0
Visual How To

Applies to: Windows SharePoint Services 3.0, Microsoft Office SharePoint Server 2007, Microsoft Visual Studio 2005.

Ted Pattison, Ted Pattison Group

May 2007

Overview

When developing for Windows SharePoint Services 3.0, you are often required to create and modify XML files that contain Collaborative Application Markup Language (CAML). It is recommended that you configure Microsoft Visual Studio on your development workstation to reference a XML schema file named WSS.XSD so that IntelliSense works properly when working with CAML-based files.

Code It

Create a new text file and name it CAML.xml. Add the following code.

Xml
<SchemaCatalog xmlns="http://schemas.microsoft.com/xsd/catalog">
  <Schema href="C:\Program Files\Common Files\Microsoft Shared\
                    web server extensions\12\TEMPLATE\XML\wss.xsd" 
          targetNamespace="http://schemas.microsoft.com/sharepoint/"/>
</SchemaCatalog>
NoteNote:
The file path assigned to the href attribute within the schema element in this code snippet should be placed on a single line. A line break has been added here to make the code more readable inside this document.

Where does the CAML.XML file go?

Next, save CAML.XML to C:\Program Files\Microsoft Visual Studio 8\Xml\Schemas\CAML.xml.

Shut down and restart Visual Studio. At this point, IntelliSense should be available whenever you work with CAML-based files that rely on the http://schemas.microsoft.com/sharepoint/ namespace.

Read It

Visual Studio has a special directory (C:\Program Files\Microsoft Visual Studio 8\Xml\Schemas\CAML.xml) that it uses to maintain a catalog of XML schemas that drive its IntelliSense feature. The installation of Visual Studio adds to this directory a standard file named catalog.xml that contains XML that references standard XML schemas. These schemas drive the default IntelliSense support that is included as part of Visual Studio. However, this mechanism is completely extensible. You can simply create another file with an .xml extension that references other, non-standard XML schemas and copy the file to the same directory. After copying this file to the correct location, you must restart Visual Studio. That's because Visual Studio examines all the XML files in this directory at startup to determine which XML schemas it should load to drive IntelliSense.

See It Configuring IntelliSense With CAML

Watch the Video

Video Length: 00:04:04

File Size: 10.0 MB WMV

Explore It
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Similar for VS2008 and 64 Bit Windows 2003      M. Blumenthal ... Red-Devile   |   Edit   |   Show History
My development environment happens to be Windows Server 2003 x64, and I am using VS 2008. The directory that caml.xml goes in is %VsInstallDir%\xml\Schemas. My VS 2008 is installed on the E drive, so my path is e:\program files (x86)\Microsoft Visual Studio 9.0\Xml\Schemas. x
John Holiday just made things much easier...      JohanLe   |   Edit   |   Show History
Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker