Domanda

i have a custom master page layout. The problem is that it works great if i install it with the Web-interface or with SPD.. Unfortunately everytime i try to deploy it using VS either direct deployment or as a .wsp via powershell and activate it using SPD it says on the sp-site that this masterpage is not valid and i should choose another one.

Am i missing some information in the elements.xml or the feature?

little bit lost..

kind regards,

peter

È stato utile?

Soluzione

Check the Elements.xml and make sure that you have the Type="GhostableInLibrary" attribute included on the <File ... /> line that references your master page. You may also need a <Property Name="ContentTypeId" Value="0x010105" /> child element as well.

i.e.

<File Url="MyCustomMaster.master" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE" >
    <Property Name="UIVersion" Value="4" />
    <Property Name="ContentTypeId" Value="0x010105" />
</File>
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top