Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Is there a supported method to add features during a solution update.

We call Update-SPSolution and then upgrade our old features using SPFeature.Upgrade but any new features in the solution do not appear to be deployed.

We could call Install-SPFeature for the missing features but we feel this is unsupported as Get-Help Upgrade-SPSolution displays the following

get-help Update-SPSolution

NAME
    Update-SPSolution

 SYNOPSIS
    Upgrades a deployed SharePoint solution.

DESCRIPTION
    The Update-SPSolution cmdlet upgrades a deployed SharePoint solution in the
    farm. Use this cmdlet only if a new solution contains the same set of files
    and features as the deployed solution. If files and features are different,
    the solution must be retracted and redeployed by using the Uninstall-SPSolution
    and Install-SPSolution cmdlets, respectively.

This seems pretty clear cut and implies that solution update can only be used to deploy new versions Assemblies and existing files.

The same set of files comment does not make sense to use because of the existence of the ApplyElementManifest which only seems to be useful to apply new element manifests e.g. new webparts.

Have we misunderstood the use of ApplyElementManifest and MapFile?

What is the real world experience of adding Features during solution update?

share|improve this question
    
Any other opinions? Does any one have confidence in being able to deploy new Features during Update-Solution –  Steve P Oct 14 '10 at 18:33

1 Answer 1

up vote 7 down vote accepted

As the documentation states, when you add new artifacts to a solution you need to reinstall it. Really nothing new here, except for support for solution dependencies (and this is really only half implemented, since you can delete solutions that other solutions depend upon without getting any warning)

Feature upgrade is an entirely different matter. No upgrades are triggered when solutions are upgraded. As you state yourself you need to trigger the upgrade either through powershell or code.

Upgrading features has really received attention in SP2010. The new ways of upgrading features both declaratively and through code gives you really good ways of keeping your existing feature instances up to par with the feature definition.

In SP2007 feature manifests would only be fired once. ApplyElementManifests gives you the possibility to add new artifacts during upgrade.

MapFile gives you the possibility to point to new locations of files.

I recommend doing a search inside the FEATURE folder for real life examples, as the dev team used feature upgrade for both v2v (12 > 14) and b2b (beta > rtm) upgrades.

Also read my whitepaper on upgrade as it contains info on upgrading solutions and features and code in general.

I also wrote an article on feature upgrade for DIWUG magazine.

I can also recommend Chris O'Brien's article series on feature upgrades.

share|improve this answer
    
I read the articles but they don't offer any advice on adding new Features during solution upgrade. What is your opinion? –  Steve P Oct 14 '10 at 6:22
    
The advice to check the Features Folder was excellent thank you. BasicWebPart/Feature.xml added new webparts during feature upgrade. So I guess we are safe to do the same too. –  Steve P Oct 14 '10 at 6:29
    
Its no problem adding new artifact thats what applymanifests are for, as long as u remember to use reactivation of solutions and not solution upgrade. –  Anders Rask Oct 14 '10 at 17:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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