Deployment of masterpage goes wrong if .wsp is used
-
07-12-2019 - |
Pergunta
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
Solução
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>
Licenciado em: CC-BY-SA com atribuição
Não afiliado a sharepoint.stackexchange