Question

I have created in my VS2013 solution a Masterpage module. The problem is that during feature activation I encounter a message 'Cannot create "_catalogs/masterpage', as if the feature was not being deployed to the masterpages catalog but rather SP tried to create the folder. Also in the ULS logs there is a message that the type of the module cannot be determined. Here is my elements.xml:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Module Name="Masterpage" Path="Masterpage" Url="_catalogs\masterpage" List="116">
    <File Url="SPTMPL.master" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE">
      <Property Name="Title" Value="SPTMPL"/>
      <Property Name="MasterPageDescription" Value="TMPL SharePoint MasterPage"/>
      <Property Name="UIVersion" Value="15" />
      <Property Name="ContentType" Value="$Resources:cmscore,contenttype_masterpage_name;" />
    </File>
  </Module>
</Elements>

Any ideas where the problem lies?

Was it helpful?

Solution

perhaps you have the url wrong

this

Url="_catalogs\masterpage"

should be

Url="_catalogs/masterpage"
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top