Posts Tagged ‘feature’

SharePoint: Error occurred during deployment step activate features

Friday, August 5th, 2011

Quick (annoying) thing. Whilst deploying a solution, you may see this error:

Error occurred in deployment step ‘Activate Features’: Key cannot be null. Parameter name: Key

This is unhelpfully connected to your Content Type definitions where you have FieldRefs and you’re closing them with the long tag, as opposed to the short tag, i.e.,

<FieldRef ID=”…”></FieldRef>

replace it with this to fix:

<FieldRef ID=”…” />

Thanks to Dhiraj.

Tip: Error occurred in deployment step ‘Activate Features’: Object not set to an instance of an object

Friday, May 6th, 2011

Yet another SharePoint vagary. If you’re trying to deploy a feature and get the unhelpful error: “Error occurred in deployment step ‘Activate Features’: Object not set to an instance of an object” check the scope of the feature that you’re trying to deploy. I added a new feature to a project that had another working feature. Both were calling the Microsoft.Office.Workflow.Feature assembly but only one was failing and it was only after a lot of messing about that it turned out to be this innocuous little setting.