Thursday, March 11, 2010

Solution to: Cannot convert type 'Microsoft.SharePoint.WebControls.ScriptLink' to 'System.Web.UI.IAttributeAccessor'

An error occurred during the processing of . http://server/_catalogs/masterpage/YOURMASTER.master(18): error CS0030: Cannot convert type 'Microsoft.SharePoint.WebControls.ScriptLink' to 'System.Web.UI.IAttributeAccessor'

When deploying and setting a customized master page to a SharePoint site collection through a feature, after the deployment of the solution and feature activation success, you can end up having the above listed error.

I guess this error might be caused for several reasons. But if you use SharePoint Designer to customize the master page and then Export option to export it into a file, SharePoint Designer adds a lot of non-sense code to the file.

In order to solve the error, you just have to copy & paste the code into a new text file and save this file as your new master page to deploy.

Hope it helps.

0 comments:

Post a Comment