Wednesday 14 May 2014

Migrating custom wsp's from sharepoint 2010 to Sharepoint 2013

 Steps to follow before we start the upgrade process

Make the following folders read only(not mandatory, but it is a best practice)
  • 14 hive folder ( C:\Program Files\Common files\Microsoft Shared\Web Server Extensions\14 (used for SharePoint 2010 back compatible components) 
  • Assembly Folder ( C:\windows\assembly (used for SharePoint 2010 dll files)

 Steps to follow during the upgrade process

  • Open the Sharepoint 2010 solution/project that you would like to upgrade to 2013 in Visual Studio 2012
  • You will get a dialog box saying “Do you want to upgrade test.com.sp.web.webparts.csproj to a SharePoint 2013 solution? Once the upgrade is complete, the solution can’t be deployed to SharePoint 2010. Do you want to continue?”
  •  Click on Yes to Upgrade to SharePoint 2013. Once the project is loaded and have made all the necessary changes to the project files which does automatically, you should get an upgrade report telling you how things went( No Errors, only Warnings and Messages for this project)
          Note: Step 3  would automatically updates the TargetFrameworkVersion to v4.5 and TargetOfficeVersion to 15.0 in .csproj files.
  •  Check out the assembly references in the project that are pointing to any SharePoint assemblies, they have automatically been updated to the correct version of the Sharepoint 2013 assembly
  •  Open the .csproj file in notepad and verify whether the following 2 lines are added/modified.
    •     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
    •    <TargetOfficeVersion>15.0</TargetOfficeVersion>
     
  • Code Updates: make sure to replace all the paths in the project source code
    • change paths to the images folders from "_layouts/images/" to "_layouts/15/images
    • change paths to the layout folders from "/_layouts" to "/_layouts/15"
    • change the paths to the ControlTemplates folder from "/_controltemplates/" to "/_controltemplates/15/"
  • Make sure the solution is build with .Net4+ framework.
  • Build, Package and deploy the upgraded wsp's in Sharepoint 2013 env
  • .        Ugraded DLLs will be deployed to c:\windows\microsoft.net\assembly location instead of c:\windows\ assembly, we can get the public key token and version details from DLL folder name.

    For Ex: below is our Common solution DLL location.
    C:\windows\microsoft.net\assembly\GAC_MSIL\test.com.sp.common\v4.0_1.0.5.1__1ab4ef9703041d81
    Here 1.0.5.1 is version number and 1ab4ef9703041d81 is public key token.

    Note: Public key token will not be changed after upgrade to 2013. 

    Issues that you may encounter after upgrade

    Site Definition


    • Feature stapling
    we need to delete all feature GUIDs from feature stapling file for deprecated functionality.
    •  Onet.Xml
    Same above change is required in Onet.Xml file.

    Branding/Rendering

    •  New Delegate controls
    SharePoint 2013 introduced so many new delegate controls, which we can override  using features similar to 2010

    •  New Master Page for both site and system pages.
    After upgrading 2010 sites, existing master pages will be broken on 2013 site as SharePoint 2013 changed the UI layout and introduced so many new options like Share, Follow, Sync, etc… to integrate all these new features in our 2010 master page is very difficult so we need to create a new master page based on OOB Seattle.master page for both system and site pages.

    Use IE Developer Tool bar or Firebug to work with CSS styles and other branding elements.

    • Dialog Pages
    By default Custom System master page will be applied to Dialog pages, so we have to add CSS class “ms-dialogHidden” to master page elements, which are not required to be rendered in dialog pages like navigation menus, search, header etc…

     In 2010 we have a css class “nostdlg” to hide page elements in dialog pages, which has been replaced with ms-dialogHidden.
    • CSS Change
     All the webparts are redered as"div" in sharepoint 2013 instead of  "table" (sharepoint 2010) , so we will have to change the css that was applied to webpart table td tr, as they all are redered as div's in sharepoint 2013

    OOB Branding options

    SharePoint 2013 allows end users to change the look and feel of sites using rich UI templates, and other options like Design Manager to change the publishing site look.

    Enhancements Required in 2013 Sites

    In 2013 we don’t have Navigation Up option to navigate back to previous links, and also we don’t have bread crumb navigation for system pages, to fix this issue we need to implement either Navigation Up or Bread crumb for system pages.
     

No comments:

Post a Comment