I have a list with content type in it. I'm trying to add a field to this content type so I can use it in the library. Here's I've added Elements. file to Content Type:

    <?xml version="1.0" encoding="utf-8" ?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
     <Field ID="{63F353F8-F206-4BB0-A3C1-1B8FA9E43C63}" DisplayName="Dull field" Name="DULLfield" Type="Text" Group="RM" Overwrite="TRUE" />

Then I've added Upgrade Action to Feature.Template.xml:

    <VersionRange BeginVersion="" EndVersion="">
        <ElementManifest Location="MyContentType\Elements."/>
      <AddContentTypeField ContentTypeId="0x0120D520005C2CAF72F4414435A29E0ACDC59F28D9" FieldId="{63F353F8-F206-4BB0-A3C1-1B8FA9E43C63}" PushDown="TRUE"/>

Then I run following script with no errors or warnings:

    Update-SPSolution -Identity sharepointproject1.wsp -LiteralPath  "C:\SharePointProject1.wsp" -GA

Now I can see new field in Site Columns, but not in my Content Type. I suppose PushDown="TRUE" parameter has to add new field to a content type, but it doesn't. What do I miss?

======== Update ======== Deployed solution with Version =, then changed Version to, Publish WSP file to local disk, run Update-SPSolution. When I get Solution version via PowerShell

$f = Get-SPFeature | where{$_.DisplayName -eq '

It's still I've opened wsp feature.xml file inside wsp file - it has correct version

What do I miss?


Give versioning to the feature, i.e. VersionRange id, then remove from VersionRange the BeginVersion property.


<Feature xmlns="http://schemas.microsoft.com/sharepoint/" Version="">
    <VersionRange EndVersion ="">
        <ElementManifest Location="MyContentType\Elements."/>
      <AddContentTypeField ContentTypeId="0x0120D520005C2CAF72F4414435A29E0ACDC59F28D9" FieldId="{63F353F8-F206-4BB0-A3C1-1B8FA9E43C63}" PushDown="TRUE"/>

Hope it helps.

  • didn't help ... – Chetvergov Aug 29 '14 at 11:53
  • Where are your Elements definition? – Nicoleta Andreea Soare Aug 29 '14 at 11:56
  • Both old and new files are in the Content Type thread in solution explorer (Elements.xml and Elements. I've just now run powershell cmdlet to get the feature version and it's "". Now I'm trying to figure out another way to set feature version... – Chetvergov Aug 29 '14 at 12:38
  • It might seem stupid but is your SharePointProjectItem.spdata under the thread updated? Can you see the file in the feature? If yes then there might be a problem with the powershell script. – Nicoleta Andreea Soare Aug 29 '14 at 12:46
  • It's unupdated indeed! I've tried again just now: Recreate Site Collection, then deploy feature with Version=, then changed Version to Version= in Feature.Template.xml, but after upgared feature still has Version= (checked bu powershell). I think there's another way to set feature version... – Chetvergov Aug 29 '14 at 13:17

I've finally got the upgrade done. Here's a list of actions I proceeded:

1.Update spsolution (.wsp file):

   Update-SPSolution -Identity SharePointProject58.wsp -LiteralPath "<Path>" -GACDeployment

2.Upgrade feature:

    $feature = $web.Features | where{$_.Definition.DisplayName -eq '*myfeature*'} 

And the most important part: You have to restart console after every time you update solution, otherwise it sticks to old version! Here's good article on the subject.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.