[Road to SharePoint 2010] Repackage Your Developments for a Better Tomorrow

Today I want to comment on what should you take care of when preparing your SharePoint 2007 customizations for the 2010 world.

The Good Guys

“The Good Guys” are those customizations that should behave well when upgraded.


The existing SharePoint 2007 features will (hopefully) upgrade with no fuss. By looking on the disclosed SP2010 SDK, one can see that the features will be able to “upgrade” themselves, invoking SPFeature.Upgrade method. This call will run the code you specify in the upgrade feature UpgradeReceiverAssembly property. This will probably be a special feature that will upgrade the rest of the features in a given scope.

This code from the SDK illustrates the issue:

Furthermore, it seems that the features will be properly versioned (at least). Again, I quote the SDK:

The value of this property can be different from the value of the Version property of the underlying feature definition. For example, you might deploy a feature that uses a feature definition with a version number of 1. At that point, both the feature instance and the feature definition have the same version number. Suppose that subsequently you modify the feature definition and re-deploy it with a version number of 2. Now the feature definition is version 2, but the feature instance remains version 1. That indicates that the feature instance needs to be upgraded. You need to run feature upgrade code to move the version of the feature instance from 1 to 2.

Solutions (WSP packages)

This recommended way of packaging the features and enhancements will hopefully upgrade straight-forward. Even more, it seems that it will be possible to “sandbox” a solution to limit its visibility to just a single site collection, without affecting the rest of the farm. The SDK mentions a SPUserSolution class (“This class allows solutions to be uploaded at the site collection scope and run in a sandbox.”).

Site Definitions

According to the STSADM preupgrade check operation, custom site definitions will have to be upgraded in-place with a Upgrade Definition File (an XML file, for sure). Hopefully, it won’t be a nightmare. Watch for a not-yet-released KB article 954761 that should explain it.


The Bad Guys

“The Bad Guys” are those customizations that you will have to rewrite or repackage in order to make them upgradeable.

Custom CAML and Ad-hoc Views

There’s new guy in town for list views in SP2010: XSLT. This standard format will replace the mutant CAML when it comes to defining the view rendering the list items. However, it comes with a price. The preupgradecheck tool will warn you which of your custom views will not be upgraded. You could leave it in CAML and SharePoint 2010 will render it well, but you will lose the new features of the XSLT-based views such as conditional formatting or SharePoint Designer 2010 customization support.

The tools mentions that “A list view using custom Collaborative Application Markup Language (CAML), a list view not associated with a Feature, or a list view associated with a custom Feature, will not be upgraded to the new XSLT-based list view”.

Custom CAML-Rendered Fields

Another CAML to XSLT victim. The custom fields that use CAML in its RenderPattern will not be upgraded to XSLT fields.

Custom Workflow Action Types

A minor issue, this one. You will have to keep a copy of your web.config and manually restore your custom workflow activity types defined in <authorizedType> tags, as they will be replaced with the new type versions.

Site and List Templates (STP files)

If you are the happy end-user that saves lists and sites for reuse as STP template files, bad news. STP files won’t be supported in SP2010, as they were present in SharePoint 2007 only to provide you with backward-compatibility with SharePoint 2003. You will have to rewrite them as site or list definitions. You can use a tool like SharePoint Solution Generator (part of the WSS 3.0 SDK) to reverse-engineer an existing site or list into a definition and then fine-tune them by hand.

Team Foundation Client Error in VS2008

A weird thing happened to me yesterday when I was trying to edit a couple of work items in Team Foundation client from Visual Studio 2008.

Could not load type ‘Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemTypeDeniedOrNotExistException’ from assembly ‘Microsoft.TeamFoundation.WorkItemTracking.Client, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’.

The cause

I’ve installed the Team Explorer AFTER patching the VS2008 to SP1. Reinstalling the VS2008 SP1 again solved the issue by patching the Team Foundation client binaries, too.

[Road to SharePoint 2010] Getting Ready for 64-bit World

Welcome to the second installment of the Road to SharePoint 2010 series. I will tackle the oldest news for this SharePoint version: it will be released only as a 64-bit installation. So, how do we prepare for this requirement? Well, by getting ready with our shiny new 64-bit servers and virtual machines.

(check the original scan from a 1983 magazine here)

The hardware and software requirements were outlined on the official SharePoint team blog.

Which hardware it will need?

64-bit hardware has been recommended for SharePoint 2007 for some time. Testing data shows that SharePoint hugely benefit from improved memory management in 64-bit environment. SQL Server is also memory-intensive application, so it will be grateful for the extended memory space. Roughly, the database will benefit the most, following by the front-end web servers, and the application servers will benefit the least.

Which Windows it will need?

SharePoint 2010 will run on Windows Server 2008 / 2008 R2 x64.

Which SQL Server it will need?

SharePoint will need SQL Server 2005 or 2008 / 2008 R2 x64.

What for the developer Virtual Machines?

You are strongly recommended to have a 64-bit host OS for 64-bit virtual machines, although you still can run a 64-bit VM in a 32-bit host OS. If you are using 32-bit OS for the host, you must have a 64-bit capable processor (check here) and activate the 64-bit virtual extensions in the BIOS (called Intel VT or AMD-V, depending on the CPU maker).

You can use the Sun Virtual Box software or VMWare to create the virtual machine. Unfortunately, Virtual Microsoft PC cannot accept 64-bit client OS in the VM.

Do I have to worry about my custom .NET code in SharePoint? How can I port it to 64-bits?

You will have to recompile your source code in 64 bits configuration (or in AnyCPU build configuration). The 64-bit NET cannot load a 32-bit-only assembly.

If you don’t have the source code, as with IFilters or third-party extensions, you will have to obtain the 64-bit version, if available. If not, you will have to remove that component from the farm.

As for the NET Framework in 64 bits, there are useful references at MSDN to help us migrate our existing code. In short, if you stick to the managed code, you shouldn’t have problems. The problems arise when you use platform-dependent (alias P-Invoke) operations that cross the managed code boundaries and access the Windows directly. There’s a known issue with int data type pointers coming from COM or P-Invoke layer, you should use IntPtr data type instead.

If you want the gory details of the 32-to-64-bits issues, Scott Hanselman has a nice blog entry about it.

How to migrate my SharePoint farm from 32 to 64 bits?

The best way is to do it gradually.First you move the database tier, then the application servers and finally the web servers, as illustrated on this figure. Do not mix 32 and 64 bit servers on the same tier.


The recommended steps are outlined in this TechNet article:  http://technet.microsoft.com/en-us/library/dd622865.aspx

[Road to SharePoint 2010] The Journey Begins Here

I’ve decided to start a new series of articles, called Road to SharePoint 2010. What I’m trying to achieve is to summarize what a SharePoint professional / developer must learn to smoothly transition to SharePoint 2010 when it becomes RTM. I hope that you will find it useful.

Enjoy the journey…



The Backpack: What Do I Assume?

  • You are a SharePoint 2007 Administrator / Developer / Consultant with 1 or more years of experience
  • You have a working knowledge of .NET Framework 3.5, Windows Server 2008 and SQL Server 2008

The Road Ahead: What Will I Post?

I will cover these topics about SharePoint 2010, with one or more posts for each main topic:

  • Harware and Software Requirements
  • Preparing Your Developments for the Upgrade
  • What’s New for Developers: Lap Around the SharePoint API Improvements
  • What’s New for Administrators: Managing SharePoint with New Tools

Warning Sign: Disclaimer

I have not signed any Microsoft Non-Disclosure Agreement for anything nor I’ve seen any non-public information about SharePoint 2010. I will base my posts on publicly available information, from Microsoft or other sources.

Official SharePoint 2010 Information from Microsoft Disclosed

After so much silence, a wealth of SharePoint 2010 information has been disclosed from Microsoft. They’ve put together a site with videos and screenshots, and even have compiled a preliminary SDK for download.

Official Logo for SharePoint 2010 (the same as SQL Server 2008 has)

New “Welcome” screen with Ribbon and streamlined UI

In-place Web Edit

SDK Sample that shows a new “client context” object in the API

Silverlight Web Parts

New SharePoint Designer UI

Two-Way Business Data Services (former Business Data Catalog)

I’ll prepare a more detailed post soon, after digesting these changes 🙂

SharePoint Navigation Doesn’t Show a Subsite for Users with Custom Permission Level

Interesting behaviour that I saw yesterday.

I had a MOSS 2007 site with a custom permission level defined on it. The users that had this permission level didn’t see the site on the top navigation bar, but if they entered the site by the URL they could enter it without troubles.

The solution was to add a “View Elements” permission to the custom permission, too. After that the site showed correctly on the top navigation bar.

June Cumulative Updates for SharePoint Released

The WSS 3.0 June 2009 Cumulative Update über-package and MOSS 2007 June 2009 Cumulative Update individual packages are ready for download.

MOSS 2007:

972569 Global

970948 Global

970947 Language specific

972562 Language specific

972564 Forms Server Global

WSS 3.0:

971538 uber package

970946 Global

The details of the patches are not yet fully available on Microsoft Support site.

The MOSS über-package is not yet ready due to dependencies with Project Server 2007.

(Source: Joerg Sinemus blog)