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

Announcing Isolator for Sharepoint
Typemock are offering their new product for unit testing SharePoint called Isolator For SharePoint, for a special introduction price. it is the only tool that allows you to unit test SharePoint without a SharePoint server. To learn more click here.

The first 50 bloggers who blog this text in their blog and tell us about it, will get a Full Isolator license, Free. for rules and info click here.

Rapid Tools for SharePoint
In case you haven't seen it, there is a packaged set of tools for working with SharePoint on Google code: http://code.google.com/p/rapid-tools/
 
There are a few nice tweeks to the setup and deployment of a SharePoint solution but this might not be for you if you already have a process in place.  That is, it seems to be a compilation of free tools already available.
 
In our case, we use Nant and Nantcontrib to automate our builds per the target environment.  This allows us to have different build/deployment configurations to choose from.  The configuration chosen depends on whether we're deploying to the development, staging, or production farm.
 
In addition, we use PsExec, part of the PsTools Suite, to execute the stsadm.exe commands on the target server.
 
Forms Authentication
I'm sure many of you are wondering why the infrequent posts on this blog.  It's all for a good reason: I've been working on a set of forms authentication Features.  Because, what's the point of a blog if we can't get feedback, right?  Of course this has all had to take a back seat to other projects in the works here, at the Fin.
 
I didn't do it all on my own, I had a great start by modifying a project on CodePlex created by Stacy Draper, the Forms Based Authentication Tools and Utils for SharePoint.  Not only was it a good, clean start but presents a good example of how to design SharePoint-styled forms that exist in the /_layouts directory.
 
The plan was to move a lot of the exisiting, inline code into class files, create forms for users to create their own account, and lock down the admin forms a bit.  I know, I know: I don't have to put code in an assembly for SharePoint.  Call me crazy - I just feel so naked leaving it visible to others.
 
The real problem is when I try to use a custom class for serializing user info to Xml.  It seems that .NET doesn't like the way I'm either A) Setting up my Web.config file B) serializing class containing user data or C) SharePoint just hates me.
 
In the Web.config file, I've added the inherits attribute to the <profile /> node and set the value to the fully qualified class name of my user data class.
 
I've tried a few different ways of indicating how SharePoint should handle serializing the attributes in the class but, so far, my efforts are to no avail.
 
I'll keep everyone posted and throw the finished solution up here when it's ready.
Blackfin