I am deploying two new site column and try to attach them to a existing site content type with
<ApplyElementManifests>
<ElementManifest Location="5b1d5abd-297f-41e2-88d4-3c2fc9c23962\elements-v2.xml" />
</ApplyElementManifests>
<AddContentTypeField ContentTypeId="0x0100964BEED5C19240C5A561F41A2C0A6A20" FieldId="{7900be76-ca1a-4563-9b4c-f738805a401b}" PushDown="TRUE" />
<AddContentTypeField ContentTypeId="0x0100964BEED5C19240C5A561F41A2C0A6A20" FieldId="{3630d838-1a0d-4fcf-99d6-6d7636356d22}" PushDown="TRUE" />
The site columns will be deployed, but both fields will not be attached to the content type. Version number of the Solution and the Feature are the same:
"version": "1.1.0.0",
"assets": {
"elementManifests": [
"elements.xml",
"elements-v2.xml"
],
"elementFiles":[
"xxx.xml",
"yyy.xml",
"zzz.xml",
"Documentation.docx"
],
"upgradeActions": [
"upgrade-actions.xml"
]
}
The elements-v2.xml does contain the definition of my two new columns. If I now add this Package to a fresh Site, the new columns are deployed, but not attached to the site content type, nor pushing down to the list content type. All definitions and Guids have been verified. I can attach the columns by UI without any error. I always follow this approach, but this time, I don't see what might be wrong.
5b1d5abd-297f-41e2-88d4-3c2fc9c23962
?AddContentTypeField
within theUpgradeActions
section? You can refer to the following link for more information: learn.microsoft.com/en-us/sharepoint/dev/schema/…