Getting Intellisense in your SharePoint XML for Visual Studio


Table of Contents

There are a few ways of getting Intellisense in your SharePoint XML Documents in Visual Studio:

Feature and Elements Manifest XML files

Site Definition Site Template XML files

Add the following SharePointCatalog.xml file to C:\Program Files\Microsoft Visual Studio 8\Xml\Schemas\ folder.

SharePointCatalog.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>

Ensure you include the namespace in the Site Definition Site Template XML file:

<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/sharepoint/">
</Project>

Portal Web Manifest XML files

TBA (anyone?)

Below is example code that out of the box you will not intellisense on (even with settings configured above).

<?xml version="1.0" encoding="utf-8"?>
<portal xmlns="PortalTemplate.xsd">
  <web name="Home" siteDefinition="CMSPUBLISHING" displayName="Home" description="Home">
    <webs>      
      <web name="Services" siteDefinition="CMSPUBLISHING" displayName="Services" description="Services" />
    </webs>
  </web>
</portal>

Labels

intellisense intellisense Delete
elements elements Delete
feature feature Delete
sitedefintions sitedefintions Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.



Creative Commons License
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License. Hosted generously by CustomWare