Enabling Sharepoint Intellisense in Visual Studio 2008


Styling Sharepoint sites depends heavily on creating and editing XML files that need to follow sharepoint schema.

the first thing to note is if WSS (Windows Sharepoint Services) are installed on the same machine as you Visual Studio on not, Microsoft suggests to develop Sharepoint application on a windows server 2003, so that debugging and testing is facilitated.

If Visual Studio is on the WSS machine then all you need to do is create a xml file e.g sharepoint.xml in the folder Program Files\Microsoft Visual Studio 9.0\Xml\Schemas

Place the following code in it

<SchemaCatalog xmlns="http://schemas.microsoft.com/xsd/catalog">
<Schema href="%CommonProgramFiles%/Microsoft Shared/web server extensions/12/TEMPLATE/XML/wss.xsd" targetNamespace="http://schemas.microsoft.com/sharepoint/" />
</SchemaCatalog>

Restart Visual Studio and add the following line to your top most element xmlns="http://schemas.microsoft.com/sharepoint/" in your XML file this should enable intellisense in your XML file.

For Environments where WSS is not installed on the same machine, wss.xsd file can be copied to the development machine and the above code altered to point to the xsd file location.