SharePoint: Error occurred during deployment step activate features

Fri, Aug 5, 2011 One-minute read

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.,

replace it with this to fix:

Thanks to Dhiraj.