Skip to content

Error when deploying a custom content type from VS 2010

June 7, 2011

Today, I was updating my custom content type for my project and when I tried to deploy the solution from Visual Studio, the deployment failed with this error:

Error 26 Error occurred in deployment step ‘Activate Features’: The field with Id {b37fb1f7-c9f0-443a-8b06-7f58390d49d2} defined in feature {a9d2fbfb-78d3-492f-94f2-95026753a0c4} was found in the current site collection or in a subsite.

I tried several time deploying and retracting the solution and the result was always the same error.

There are some workarounds to fix this:

Workaround 1:

  • Open Task Manager and killed VSSPHost4 process.
Workaround 2:
  • Right click on Project node in Solution explorer and click “Retract”. This will retract the Field.
  • Close VS. This will flush the stale cache.
  • Open the project in a new instance of VS and re-deploy the solution.
Workaround 3:
If closing VS after retract doesn’t solve the problem then a longer workaround is:
  • Redeploy the project -> This will show an error during feature activation.
  • Go to “Manage Site Features” under “Site Settings” in SharePoint UI in the browser.
  • Activate and then Deactivate the deployed feature which contains the Field.
  • Retract the Solution in VS i.e. right click on the Project node and click “Retract”.
  • Close VS. This will flush the stale cache.
  • Open the project in a new instance of VS and re-deploy the solution. This should work.
Advertisements

From → SharePoint 2010

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: