Follow in Twitter & Facebook


Like in Facebook

Powered By Blogger Widgets

Free Download

FREE Tools


Thursday, November 17, 2011

Error occurred in deployment step 'Activate Features': Failed to instantiate file filename from module modulename: The specified list does not exist









While deploying a custom page layout through Visual Studio 2010 to a SharePoint 2010 publishing web site, I got the error "Error occurred in deployment step 'Activate Features': Failed to instantiate file "MyCustomPageLayout.aspx" from module "ourlayout": The specified list does not exist." My Elements.xml file code is shown below.

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Module Name="ourlayout"  Url="_catalogs/ourlayout">
    <File Path="ourlayout\MyCustomPageLayout.aspx" Url="MyCustomPageLayout.aspx" Type="GhostableInLibrary" >
      <Property Name="Title" Value="My Custom Page Layout" />
      <Property Name="ContentType" Value=";$Resources:cmscore,contenttype_pagelayout_name;" />
    </File>
</Module>
</Elements>

So the proble was the path in the Url which was defined as Url="_catalogs/ourlayout". So I have modified the code below and it works for me.

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Module Name="ourlayout"  Url="_catalogs/masterpage/ourlayout">
    <File Path="ourlayout\MyCustomPageLayout.aspx" Url="MyCustomPageLayout.aspx" Type="GhostableInLibrary" >
      <Property Name="Title" Value="My Custom Page Layout" />
      <Property Name="ContentType" Value=";$Resources:cmscore,contenttype_pagelayout_name;" />
    </File>
</Module>
</Elements>




0 on: "Error occurred in deployment step 'Activate Features': Failed to instantiate file filename from module modulename: The specified list does not exist"