3

I added a custom master page that someone else had provided me into a farm solution and deployed it from within Visual Studio.

I created a default Page in the Pages library.

I updated the master page in "Site Master Page Settings" page

On refreshing my default test page I get this error.

Sorry, something went wrong
http://server/_catalogs/masterpage/projectname/my2.master(244): error CS0030: Cannot convert type 'Microsoft.SharePoint.WebControls.ScriptBlock' to 'System.Web.UI.IAttributeAccessor'

1 Answer 1

1

After a while I discovered that just editing (adding a space) to the master page in SharePoint Designer fixed it.

I then copied the resulting saved SharePoint Designer master page back into my solution and deployed that and it worked fine.

Comparing the two files, the master page that had been provided to me originally had some extra attributes in the markup, for example

__designer:Preview=""

This is something to look out for.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.