开发者

Custom sitecolumns can't update

开发者 https://www.devze.com 2023-03-08 09:53 出处:网络
I have made a ContentType in Vi开发者_如何学编程sual 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

I have made a ContentType in Vi开发者_如何学编程sual 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.


SharePoint will not let you delete site columns and content types that are in use. This makes the upgrade process a little tricky.

  • If you just want to add a field to your content type you can use the Feature upgrade facilities in SharePoint 2010. This blog post series should help you: http://www.sharepointnutsandbolts.com/2010/06/feature-upgrade-part-1-fundamentals.html

  • If you need to make any other changes (remove field, change type, etc) then you need to take a different approach. You'll create a new content type that inherits from, and eventually replaces, your existing content type. This strategy is discussed here: http://msdn.microsoft.com/en-us/library/aa543504.aspx


Besides checking out what Rob suggests:

Did you install Visual Studio SP1? I received that error before installing SP1 and the workaround was closing all Visual Studio instances and starting it up again. After starting up deployment was possible again.

0

精彩评论

暂无评论...
验证码 换一张
取 消