1

I have made a ContentType in Visual Studio 2010 for my SharePoint 2010 project and the first time I deployed the wsp through the WSPBuilder there were no troubles but now every time I try to deploy, it keeps saying that it can't activate features because "The field with ID {insert random guid here} defined in feature {60938308-3563-497c-bc55-b2ae847ca8b8} (the feature activating my contenttype on the site) was found in a current site collection or in a subsite."

The contenttype and site columns gets created on the rootweb and even though I try to either deactivate the feature or completely uninstall it, the site columns and contenttype won't be deleted from the ContentType gallery or Site Columns gallery.

How can this be?

I use pure feature and XML functionality. No eventreceivers are involved.

2
  • 1
    Duplicate of stackoverflow.com/questions/6121185/… Commented May 25, 2011 at 8:13
  • @RobWindsor We're a different community with a different audience, so it's OK by me if this question was posted on another site as well as here. You might like to bring this topic up on our meta site for discussion.
    – Alex Angas
    Commented May 25, 2011 at 8:40

2 Answers 2

3

The content types and columns won't be removed automatically when you deactivate the feature or retract your solution unless you implement a feature receiver to do this through the object model. Even then it will probably throw an exception if the content type is in use anywhere in your site.

If you need to make changes to a content type that you already deployed you can either make changes through the object model and push down changes (in the feature receiver), or create a new content type and make the old one _Hidden.

Links:

Updating Content Types on MSDN

Updating Child Content Types

1

The Visual Studio Cache is not "releasing the hook". Just retract the solution, close VS, reopen VS and deploy the solution. You'll have to do this each time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.