Thursday, December 1, 2011

Failed to instantiate file "Home.aspx" from module "SitePagesModule": The specified list does not exist

We have a module in our SharePoint 2010 VS project which deploys the custom aspx pages in site pages document library.

Whenever we try to deploy this project, we get the below error:

Failed to instantiate file "Home.aspx" from module "SitePagesModule": The specified list does not exist

The possible solutions to this problem can be:

1. Delete the Module which deploys the site pages and add them again
2. In Elements.xml of the SitePages Module, change the Type Attribute value from "GhostableInLibrary" to "Ghostable" as shown below
<File Path="SitePagesModule\Home.aspx" Url="Home.aspx" Type="Ghostable" IgnoreIfAlreadyExists="TRUE" />

This is it. Now, the above error stopped flashing again :)

Happy SharePointing !

1 comment: