Thursday, 18 April 2013

How to deploy WSPs from SharePoint 2010 in SharePoint 2013



In this post we will discuss some of the Important things to note while deploying SharePoint 2010 Solutions in SharePoint 2013. These results are based on Our experiences and findings from various posts about migration around the web.

Deploy SharePoint 2010 Solutions in SharePoint 2013 -

Migrating Custom Wsp Solutions -

Most of the wsp Solutions deployed in SharePoint 2010 should work fine in SharePoint 2013. This is because of the Support for both 14 Hive and 15 Hive directories that are Created in SharePoint 2013 by default.

Initially, when you deploy a SharePoint 2010 Solution it gets deployed to 14 Hive and not 15 Hive. To force the solution to install in 15 Hive you need to modify manifest.xml file of your solution and add addSharePointVersion=”15.0″ attribute to it. The Solutions can be forced to install in 15 hive that way However, some of the files especially that refers to _layouts might not work. All SharePoint 2010 Solution files that refers to _layouts folder (i.e. Features, Layouts-files, Images, ControlTemplates)needs to be updated(best approach is to Re-Create the Solution in Visual Studio 2012).In 15 hive , files in Layouts directory has a Path with ’15′ added to it.

For example path of a Custompage in 14 and 15 hive would be -
14 Hive path  – _/layouts/Custompage.aspx
15 Hive  path – _/layouts/15/Custompage.aspx

Notice the reference of 15 in _layouts folder reference in 15 Hive.This is reason you need to update paths of all the deployed files such as Features, Layouts-files, Images, ControlTemplates if the solutions is targeted to be deployed in 15 Hive.

Compatibility Level - In addition to SharePointVersion=”15.0″ attribute,with the new “CompatabilityLevel” parameter of Install -SPSolution cmdlet you can now deploy your .wsp or Solution to either 14 hive, 15 hive or both using the Powershell itself.This “Compatibility Level” value overrides SharePointProductVersion specified in manifest of the solution and it is only way with which solutions can be installed in both 14 & 15 Hive.

Compatibility Level Impacts only files deployed to the Templates folder in the 14/15 Root folder i.e. Features, Layouts-files, Images, ControlTemplates, etc.The files deployed Outside of this folder (e.g. a WCF Service) will be deployed to the 15/ISAPI regardless of the Manifest or PowerShell Compatibility level settings of the wsp-package. Files such as Assemblies in GAC/Bin and certain resource files will also be deployed to the same location regardless of the Compatibility Level.

Bin Directory Considerations -
Also, you can no longer add partial trust solution packages to the \bin directory.Any files deployed to the \bin directory must be full trust.

GAC Considerations - After the Release of .NET Framework 4.0, the GAC was split into two, one for each CLR.
c:\windows\assembly is the location for .NET versions 1.0 through 3.5 and
c:\windows\microsoft.net\assembly is location for all the dlls for project Created in .NET Framework 4.0.
Consider looking into new Location if you have Created your project in Visual Studio 2012.
For these reasons and more it is Recommended to Re-Create a Solution in Visual Studio 2012, Re-add all the features, Components and then deploy it to SharePoint 2013 in 15 hive.

Sandbox Solutions -

Sandbox solutions are upgraded with the Content databases.

Fabulous 40 templates in SharePoint 2013 -

As per MSDN, Microsoft is not Creating any New Versions of these Fabulous 40 Templates. The Old Sites based on these templates can be upgraded only if the Templates are Installed successfully in SharePoint 2013.You can try installing wsp of Fab 40 with CompatabilityLevel as 15 and upgrade the existing site collections.

Master pages and CSS files -

Master Pages and Css has Changed a lot in SharePoint 2013.You can deploy a master page in Master page gallery but the styles from old core.css needs to be updated.See some useful tips on How to Override default Css in Layout and Master Pages in SharePoint 2013

Themes -

Re-create your themes following the SharePoint 2013 theming guidance, or select a new theme available in SharePoint 2013.

Site definition -

Migrate sites to a supported, predefined site definition, then apply Custom features by using Solution deployment.You can also Continue to use a Custom site definition. You do not have to create a new site definition that is based on SharePoint 2013.


Ads by Google

No comments:

Post a Comment