title: System.ArgumentNullException on feature enabling VERY SIMPLE Feature
body: <p>I created a vs solution with :</p>
  
  <ol>
  <li>2 Site columns</li>
  <li>One content type</li>
  <li>One list template</li>
  <li>One list instance.</li>
  </ol>
  
  <p>It compiles without any problem.
  The feature packages all 4 things, IsHidden is set to true because its meant to be enabled via powershell only.</p>
  
  <p>However when I enable it, i got the following exceptions in the log</p>
  
  <pre><code>Enable-SPFeature : Key cannot be null.
  Parameter name: key
  At line:28 char:17
  + Enable-SPFeature &lt;&lt;&lt;&lt;  "SlnOneSkyTeamsCustomization_FeatureExternalCIRCASites" -Url http://ost-dev1.ciredev1.local/
      + CategoryInfo          : InvalidData: (Microsoft.Share...etEnableFeature:SPCmdletEnableFeature) [Enable-SPFeature], ArgumentNullException
      + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletEnableFeature
  </code></pre>
  
  <p>I install the feature like this:</p>
  
  <pre><code># Adds and Installs the SP Solution 
  Add-SPSolution -LiteralPath "D:\Sources\s\27022012\SlnOneSkyTeamsCustomization\SlnOneSkyTeamsCustomization\bin\Debug\SlnOneSkyTeamsCustomization.wsp"
  Install-SPSolution –Identity SlnOneSkyTeamsCustomization.wsp -GACDeployment -Force 
  
  # Install-SPFeature use it only after installing or upgrading the solution
  Install-SPFeature "SlnOneSkyTeamsCustomization_FeatureExternalCIRCASites" -force
  Enable-SPFeature "SlnOneSkyTeamsCustomization_FeatureExternalCIRCASites" -Url http://x/
  </code></pre>
  
  <p>Only the last line is the one that throws the exception.</p>
  
  <p>on the uls logs I see also:
  Key cannot be null.  Parameter name: key</p>
  
  <p>Feature Activation: Threw an exception, attempting to roll back.  Feature 'SlnOneSkyTeamsCustomization_FeatureExternalCIRCASites' (ID: '4abb1043-ac29-4897-8ebc-7e01b897e6ed').  Exception: System.ArgumentNullException: Key cannot be null.  Parameter name: key     at Microsoft.SharePoint.Administration.SPElementDefinitionCollection.ProvisionFieldsAndContentTypes(SPFeaturePropertyCollection props, SPSite site, SPWeb web, Boolean fForce)     at Microsoft.SharePoint.Administration.SPElementDefinitionCollection.ProvisionElements(SPFeaturePropertyCollection props, SPWebApplication webapp, SPSite site, SPWeb web, Boolean fForce)     at Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection props, Boolean fForce)</p>
  
  <p>Error Category: InvalidData    Target Object  Microsoft.SharePoint.PowerShell.SPCmdletEnableFeature  Details  NULL  RecommendedAction NULL</p>
  
  <p>I can show the code for all files here below.</p>
  
  <p><a href="https://sharepoint.stackexchange.com/questions/30244/system-argumentnullexception-on-feature-enabling">https://sharepoint.stackexchange.com/questions/30244/system-argumentnullexception-on-feature-enabling</a></p>