Monday, November 21, 2011

System.MissingMethodException: No parameterless constructor defined for this object error in custom pagelayout

In this post we will discuss how to resolve error: System.MissingMethodException: No parameterless constructor defined for this object error in custom pagelayout.

Also you can check out my previous posts on:

- Programmatically get SharePoint Themes

- Signin as different user is missing in SharePoint 2013

- Change "Add New Item" link text in list in SharePoint 2010

I got this error "System.MissingMethodException: No parameterless constructor defined for this object " while trying to add a custom web part to a custom page layout using Visual Studio 2010 in SharePoint 2010. I was getting the error when I am changing the page layout to my custom page layout.

My problem was with the 4 part assembly name that I was getting by following this link.

Actually that was giving me the wrong 4 part assembly name that I was using in my elements.xml file. So I have changed the 4 part assembly name and that worked !!! The best way to get 4 part assemble is by following this article.