Problems with SharePoint 2007 Migration to SharePoint 2010
At the office one of mine colleagues (Jos van Vlimmeren) was trying to perform a migration of a SharePoint 2007 site to SharePoint 2010. He had a backup of the database and attached it into the SQL Server of the SharePoint 2010 farm. Before he mounted the content database to the web application he used the Test-SPContentDatabase PowerShell cmdlet to check if the database was ok. From the test he got several errors on out of the box webparts like the following:
---------------------------------------------------------------------------------------------------------------
Category : MissingWebPart
Error : True
UpgradeBlocking : False
Message : WebPart class [bc877bd0-b48e-3165-7c9e-1e2f98c2a42a] is referenced [30] times in the database [SP_ContentDb], but is not installed on the current farm. Please install any feature/solution which contains this web part.
Remedy : One or more web parts are referenced in the database [SP_ContentDb], but are not installed on the current farm. Please install any feature or solution which contains these webparts.
-----------------------------------------------------------------------------------------------------------------
To find more information about the errors he used a tool to verify which webparts were giving the errors. The tool works with the output file you get from the Test-SPContentdatabase cmdlet. To get a output file from the cmdlet you can do the following:
Test-SPContentdatabase -name SP_ContentDb_Operations -WebApplication http://localhost | Out-file c:\TestSP_Content_Operation.txt
The output file can be read out by the tool that comes from codeplex. The tool will state the names of the webparts and the urls of the sites on which the webparts reside. The tool can be found on the following location (http://sp2010extmigrareport.codeplex.com/). The tool can be used in the command prompt with the following syntax:
sharepoint2007migration.console.exe "C:\TestSP_Content_Operations.txt" c:\ReportSP_ContentDb_Operations.txt
After he had run the Test-SPContentDatabase he mounted the content database with the Mount-SPContentDatabase PowerShell cmdlet to attach the database to an existing web application. When he saw that the site wasn’t working he realized that something was wrong. Like the errors the webparts were still referencing the webpart assemblies in version 12. So you have to change the references to the 14 version assemblies. This can be done by adding a couple of binding redirects. The bindings we had to add to the web.config were:
<dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyIdentity name="Microsoft.SharePoint.Portal" publicKeyToken="71e9bce111e9429c" culture="neutral" /> <bindingRedirect oldVersion="11.0.0.0-12.0.0.0" newVersion="14.0.0.0" /> </dependentAssembly> <dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyIdentity name="Microsoft.SharePoint.Publishing" publicKeyToken="71e9bce111e9429c" culture="neutral" /> <bindingRedirect oldVersion="12.0.0.0" newVersion="14.0.0.0" /> </dependentAssembly> <dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyIdentity name="Microsoft.Office.Server.Search" publicKeyToken="71e9bce111e9429c" culture="neutral" /> <bindingRedirect oldVersion="12.0.0.0" newVersion="14.0.0.0" /> </dependentAssembly> <dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyIdentity name="Microsoft.SharePoint.Search" publicKeyToken="71e9bce111e9429c" culture="neutral" /> <bindingRedirect oldVersion="12.0.0.0" newVersion="14.0.0.0" /> </dependentAssembly>