December 18, 2009 Leave a comment
Apparently it has been about six months since I’ve written a blog post. Its been a busy few months since then. I’ll spare you all the details but long story short, I’m going to blame on it on the calm before the SharePoint 2010 storm that was unleashed at the SharePoint Conference in October when the beta was officially unleashed on the world. All excuses aside, it is time to put back on the game face and get back to business.
It was great relief when the beta was released and the NDA was lifted cause we could finally talk about all the cool new stuff. There’s a ton of great new features and functionality but I was itching to get my hands dirty and do something real. Something that others would be doing…what better place to start than upgrading something?
The goal was to take SharePoint911’s public MOSS site and upgrade it to SharePoint 2010. In the next few blog posts I’m going to highlight the steps that I went through with the help of my colleague Randy Drisgill to eventually flip the switch on the new site.
Before we begin – let me real quick explain what we are working with here. SharePoint911’s public facing site started life as an out of the box site collection using the Publishing Portal site template. To get the user interface we were looking for, it has a custom master page and several page layouts with supporting CSS and images. Everything about the site is deployed with a SharePoint Solution Package (.WSP file). This means all files on the site are uncustomized.
The whole idea seemed pretty simple – move the content database to the SharePoint 2010 server which will upgrade the content on the fly via the database attach method and use the visual upgrade functionality of SharePoint 2010 which should allow us to get our site migrated while still using the old master page until we could a new master page for the site. Here’s the basic steps I followed:
1) Backed up the main content database from SQL on my MOSS farm.
2) Restored the content database to the SQL server in my SharePoint 2010 farm.
3) Added and deployed my WSP to the SharePoint 2010 farm
4) Create a new web application called http://beta.sharepoint911.com
4) Ran the following command to attach the database to SharePoint 2010:
stsadm –o addcontentdb –databasename wss_content_blah –url http://beta.sharepoint911.com –preserveolduserexperience true
Fun side note – when you do the db attach you actually get some feedback this time around about the progress. No more staring at a blinking cursor for 5 mins!
Theoretically – the next step should be that I open up the site and it will come up with the v3 look and feel but can still take advantage of the other things that SP2010 has to offer. But that isn’t what happened. I was greeted with the following error:
http://server/_catalogs/masterpage/sp911.master(123): error CS0234: The type or namespace name ‘SearchBoxEx’ does not exist in the namespace ‘Microsoft.SharePoint.Portal.WebControls’ (are you missing an assembly reference?)
My first reaction was to pick up the phone and ask Randy what the heck he did to break the site. After a little playing we realized a few things were true, removing the SearchBoxEx control did fix the problem, but you shouldn’t have to. We also found that if you copied the code out of the v3 BlueBand.master and tried to deploy it with a Feature you’d get the same behavior because it had the same control.
It turns out this is a bug in the Beta which will be fixed in RTM. Just to be clear on this – if you try to deploy an uncustomized master page which uses the SearchBoxEx control using visual upgrade you will receive the error. If you do encounter this issue there is a very simple work around: Customize the master page. We aren’t really sure why this works, but we assume that the reason is because customizing the page seems to give SharePoint the ability to inject code into the master page which somehow seems to circumvent this issue.
Overall, aside from this little hiccup the migration process was very smooth. The end result was our v3 branding running in a SharePoint 2010 environment. In the next installment I’ll talk about how I imported my v3 WSP into Visual Studio 2010 and deployed the changes to my new site. Stay tuned!!
For a peek at the finished product of the migration take a look at http://beta.sharepoint911.com