Monday, March 3, 2014

SharePoint 2013 Error Moving Design Package From Office 365 To On Premises

A error occurs when you import Office 365 SharePoint 2013 package to your on premises SharePoint.


Today I faced an error when I moved the branding design form Office 365 SharePoint to on premises.
The error was obvious becuase Office 365 SharePoint is always up to date while on premises not always.

There was two errors, one more Microsoft.SharePoint and other for Microsoft.SharePoint.Publishing.
Following is the exact error message for Microsoft.SharePoint.Publishing
Sorry, something went wrong 
Could not load file or assembly 'Microsoft.SharePoint.Publishing, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified


The solution:
The solution is to replace the version number from "16.0.0.0" to "15.0.0.0" on associated html page for Master and Layout page.

Step 1: Correct the version number for Microsoft.SharePoint

I went to associated HTML page and
repalced:
Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c

with:
Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c

Step 2: Correct the version number for Microsoft.SharePoint and Microsoft.SharePoint.Publishing in associated layout page:

I replaced:
Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c
Microsoft.SharePoint.Publishing, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c

with:
Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c
Microsoft.SharePoint.Publishing, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c