Thursday 8 April 2010

stsadm –o activatefeature –force suppresses error messages

Oh the pain: your solution builds and deploys with no error messages but something’s awry, your feature files are where they need to be in the .wsp/.cab and the target file system but SharePoint is none the wiser. So you lather, rinse and repeat (er, rebuild, redeploy, re-activate) to no avail; everything’s working yet nothing’s working!

We have our stsadm –o activatefeature commands tucked away in our deployment scripts and they just happen to use the –force parameter. This is normally fine, except when the feature breaks; in this case the feature is still force activated—as requested—but error messages are suppressed… in other words everything seems okay but it’s all really all horribly wrong. Even the event log is clean as a whistle.

So to figure out what’s going on, drop the –force attribute (you may need to deactivate the feature manually first), and reactivate. Behold the error message in all its glory.

No comments:

Post a Comment

Spam comments will be deleted

Note: only a member of this blog may post a comment.