ARTICLE

"Error occurred in deployment step 'Activate Features': Key cannot be null. Parameter name: key" in Visual Studio 2010

Posted by Vijai Anand Articles | Visual Studio 2010 August 07, 2012
In this article you will see how to resolve the error “Error occurred in deployment step 'Activate Features': Key cannot be null. Parameter name: key” in Visual Studio 2010.
Reader Level:


In this article you will see how to resolve the error "Error occurred in deployment step 'Activate Features': Key cannot be null. Parameter name: key" in Visual Studio 2010.

Error

I have created a custom Content Type using Visual Studio 2010. The entire solution looks like the following:

Shr1.jpg

When I try to deploy the solution from Visual Studio 2010 by right-clicking on the solution and then click on Deploy, I was getting the error:

"Error occurred in deployment step 'Activate Features': Key cannot be null. Parameter name: key"

Reason

The reason is in the Content Type, the Elements.xml file <FieldRef> tag was closed as </FieldRef> which will be considered as an empty or null element.

Shr2.jpg

How to Resolve

In the Content Type Elements.xml file remove the </FieldRef> element and close the <FieldRef> element as shown below:

Shr3.jpg

Now I was able to deploy the content type successfully from Visual Studio 2010.

Summary

Thus in this article you have seen how to resolve the error "Error occurred in deployment step 'Activate Features': Key cannot be null. Parameter name: key" in Visual Studio 2010.

Login to add your contents and source code to this article
post comment
     

Thanks for sharing this info.

Posted by Venkatesh Kumar Aug 10, 2012
COMMENT USING
PREMIUM SPONSORS
Over-C is a holistic consortium of communications and technology specialists. We build, deploy and market both business as well as consumer products and solutions.
Get Career Advice from Experts
SPONSORED BY
  • PDF reports have never been easier to create. With our included WYSIWYG Designer, you can layout your reports, set up your data source and let DynamicPDF ReportWriter do the rest.
Get Career Advice from Experts