Monday, September 19, 2011

Migrating Existing Custom MOSS 2007 sites to SharePoint 2010

Various methods are documented on a high level by Microsoft here.
I preferred creating a site definition from the existing MOSS 2007 site and then restoring it in SharePoint 2010.

I have noted down the approach that I used in the process along with some references.



      1. Create a new site definition (based on Team Site) from scratch: Objective here is to start with a minimal site on which our custom site can be built.

      2. Using Solution Generator, Create list definitions for each list, include it in the project and then include it in your onet.xml

            3. Deploy the site definition once in SharePoint 2007 and test if the site gets restored.

      4. Convert & Deploy this site definition in SharePoint 2010.


       Note:
  •       The web-parts that might have been added through browsers in the web-part zones in SP 2007 will disappear. Those need to be added manually.
  •          Look up columns disappear from the restored list in SP 2010
              (Solution: The Field element is commented by Visual Studio. Need to uncomment it and replace the
ListId value with List URL (Relative))
  •          Your existing master page in 2007 would not be useful in 2010, as it would not support ribbon controls.
o   You may copy the contents of v4.master from SharePoint 2010 into your master page and build from there.
o    Another approach would be to add the content placeholders required for SharePoint 2010 into your master page.


       5. Convert & add the custom solutions into the site template solution and re-deploy the solution.

           6. Solutions developed in VS 2008 can be migrated to VS 2010 using the in-built converter in VS 2010.

             7. WSP Builder for VS 2010 can be installed to create WSP’s for such solutions

            8. <%@ Assembly Name="Microsoft.SharePoint.ApplicationPages, Version=12.0.0.0, 
                   Culture=neutral,PublicKeyToken=71e9bce111e9429c" %>

                   The above reference needed to be changed as given below on all application pages.
        <%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>

               9. An initialization feature receiver can be created and included in the ONET.XML file such that the feature  gets activated on site provisioning. The feature can be used for foll. purposes..
          A)     Groups to be created with the site can be added here.

                       10. Finally it may be converted to a web template in SharePoint 2010 to ensure it stays compatible with 
                            future versions of SharePoint.
                      (Refer an MSDN article here which indicates that ‘Site Definitions’ may no longer be supported in future versions of SharePoint)

          Advantages of this method:
                                                   i) Minimum efforts in recreating the list schemas in 2010 due to use of Solution Generator
                              ii) List forms and views will also get carried along using Solution Generator.
                              iii) All the custom code can reside in a single solution along with the Site Definition creating only one
                                  WSP.

          free counters

          0 comments:

          Post a Comment