Failed to instantiate file "File.ext" from module "Modules": The specified list does not exist.

I have just assisted in resolving this problem which got me some time ago.  If you are developing a feature with a module and receive this error, it is because your module path is a folder and you are setting the "Type" attribute to "GhostableInLibrary".

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Module Url="_cts/Folder" Name="Modules">
    <File Path="ModulesTemplate.dotx" Url="Template.dotx" Type="GhostableInLibrary" />
  </Module>
</Elements>

If the "Url" attribute of the "Module" element points to a folder, rather than a list, then you cannot set the "Type" attribute to "GhostableInLibrary" as this is an attribute of a document in a library.

One Response to “Failed to instantiate file "File.ext" from module "Modules": The specified list does not exist.”

  1. nlvraghavendra says:

    Great tip. It helped me. Thanks.

    NLV

Leave a Reply