Blackfin Blog > Categories
Unspecified Error: the story of my life.
I clicked "Reset all pages in this site to site definition version".  And I finally had enough of these type of experiences.  Check it out:
Thanks for the update, MOSS!!!
 
Ironically, me and a colleague were just saying that if we had to make a movie about, well...whatever, it would be called "MOSS Madness: it's not easy to fit a square peg in a square hole."
 
Or maybe it should be more like "MOSS Madness: no right way to fit a square peg in a square hole."
 
 
SharePoint Intellisense
I recently upgraded my workstation to run Server 2008 x64.  I was surprised to find that when I tried to install Visual Studio Extensions for SharePoint, the process failed.  The reason being that:
This product cannot be installed on 64-bit versions of Windows.
I didn't care so much since I only really wanted one thing: intellisense on the XML documents.  That is code hints in my Feature.xml, Elements.xml, ONET.xml, etc.  Anymore, this is about the only thing I find helpful out of the toolset.
 
So, how do you get that back?  Well, you can do one of two things:
  1. Extract the files from the .msi package.
  2. Create the one file you need all on your own.

Extracting Files From .MSI Package

It's possible to pull files from an .msi file by accessing from a command prompt.  Since MSI files use the msiexec.exe application to execute, all possible parameters and short descriptions can be found by entering the following command into a prompt:

 msiexec.exe /?

In our case you'll need to supply a value indicating where you'd like the files copied to.  So, it will look something like this:

 msiexec /a mypackage.msi /qb TARGETDIR="C:\VSeWSSv13_x86_Build-433_Extracted"

Then you'll need to locate the XML file we'll copy to our Visual Studio directory, wsscatalog.xml.  Using the previous directory as an example, It will be in C:\VSeWSSv13_x86_Build-433_ExtractedXml\Schemas.

Now, you'll need only to copy that file to your Visual Studio XML directory.  In my case (Visual Studio 2008), it would look like this:

 C:\VSeWSSv13_x86_Build-433_Extracted\>copy Xml\Schemas\wsscatalog.xml "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Xml\Schemas"

Creating a File From Scratch

An alternative to the previous method would be to create an XML file yourself in the Visual Studio schema directory (again, it's C:\Program Files (x86)\Microsoft Visual Studio 9.0\Xml\Schemas).

If pulling an existing file from the previous section, the contents of the file would simply look like this:

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

Since I'm using a 64-bit version of Server 2008, I'm going to modify the href attribute to use the full, explicit path:

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

Test It Out

Restart Visual studio and create a new XML file.  At the top of the file, be sure to reference the SharePoint schema by adding the xmlns attribute.  In the case of a Feature defintion, it might look like this:

<Feature xmlns=http://schemas.microsoft.com/sharepoint/>
</
Feature>

You should now start to notice code hints popping up as you proceed through the document like this:

SharePoint Intellisense in XML Files

Blackfin