Blither, Blather, Web Content Management.
Blog » Microsoft Office Server Reference

Microsoft Office Server Reference

I spent a lot of time today trying to figure out why I couldn't create an instance of the Microsoft.Office.Server.UserProfiles.UserProfileManager class. In fact, when I used the object browser, it was as if half of the UserProfile namespace was missing.

I made a rookie mistake that I'll never make again. I guess this is the first time I've tried to write code that targets MOSS. I've written plenty of stuff that targets WSS V3 and plenty for Portal Server 2003, but Microsoft threw me a curve ball on this one.

You see, I referenced the wrong .dll in my project.

I clicked Add Reference.

I scrolled down passed all the Microsoft.Office components

Clear down to the Microsoft® Office SharePoint®Server components.

I found that the first one points at the most generic .dll (microsoft.sharepoint.portal.dll), so I referenced it.

It contained the proper namespace, just not the class I was looking for.

What I didn't realize was that there was another component called Microsoft Office Server component that points to Microsoft.Office.Server.dll

So if your looking at the list of components to register, keep this in mind:

A component named Microsoft<dot>Office.Server would fall in the middle of the list, right between Microsoft.Office.Interop and Microsoft.Office.Tools, but this component doesn't exist.

A component called Microsoft<trade mark>Office SharePoint®Server does exist and falls at the end of the list. It contains the namespace you want, but isn't really what you want.

What you want is the one called Microsoft<SPACE>Office Server, which is at the beginning of the list.

Good Luck!

PS. Microsoft: way to go on those naming standards. Maybe next time you could misspell "Microsoft" and throw us all for a loop.

Posted: 11/18/2008 8:38:00 AM by Ryan Miller | with 0 comments
Filed under: SharePoint