Using SharePoint XSDs in Visual Studio
One of the things that made SharePoint developers lose sleep and hair over was the lack of intellisense support when working with the products XML files.
In WSS V3 and MOSS we will ship the corresponding XSDs. This is great news because you can use those XSDs to validate your XML files to make sure they are correctly formed etc...
Another nice side effect this has is the ability for Visual Studio to use these XSDs to provide you intellisense support when working on these files.
E.g:
To get this going here is what I did.
- Open the XML file you want to work on E.g. your Onet.xml file
- Add xmlns:"https://schemas.microsoft.com/sharepoint" declaration in the root node E.g: <Project xmlns:"https://schemas.microsoft.com/sharepoint" ... >
- Then you need to instruct Visual Studio where to find the XSDs that define the schema for that namespace. To do this (Visual Studio 2005):
- With your XML document open press F4 to bring up the properties pane
- Click the ellipsis next to the "Schemas" property
- Click the Add button down at the bottom of the XSD Schemas dialogue
- Navigate to c:\program files\common files\microsoft shared\web server extensions\12\TEMPLATE\XML
- Highlight all the XSD files
- Click Open
- Click OK
You should now have intellisense working!
There might be other ways of doing this, but this is one method i have found to work for me. If anyone has another way they do it please comment!
-Chris.
Comments
Anonymous
September 20, 2006
Here is an assortment of various 2007 Microsoft Office SharePoint Server Documentation / Reference Materials...Anonymous
September 17, 2007
2007 MOSS Resource Links (Microsoft Office SharePoint Server) Here is an assortment of various 2007 MicrosoftAnonymous
June 09, 2009
PingBack from http://hairgrowthproducts.info/story.php?id=61Anonymous
June 12, 2009
PingBack from http://insomniacuresite.info/story.php?id=7900