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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s