sharepoint2010 部署内容类型失败

错误如下:部署步骤“激活功能”中出现错误: 在当前站点集或子网站中找到功能 {27ee5fb6-1117-4061-96a4-350dda3283f5} 中定义的 ID 为 0x01010082D60DA9FD754A6CB66038DA80E5F7A4 的内容类型。

原因是我修改了contenttype 的 guid(加了红色部分) .

 <ContentType ID="0x01080100c89c69f513474a9cba6fc48b931272cb"

在网上找了下:

http://support.microsoft.com/kb/2022443(这个应该可以解决大部分问题)

First resolution:

·          Retract the Solution/WSP in VS.

·          Close VS.

·          Reopen VS and deploy the Project.

 

Second resolution:

If closing VS after retraction doesn't solve the problem then a larger workaround is:

·          Redeploy the project -> This will show an error during feature activation.

·          Go to SharePoint UI and Activate and then Deactivate the deployed feature that was showing activation error in VS.

·          Retract the Solution/WSP in VS.

·          Close VS.

·          Reopen VS and deploy the Project.

可我按以上步骤做了还是不行,不过以上步骤应该是正确的,于是继续折腾,然后搞定了,具体是哪个操作搞定了,不是很清楚.

做过的操作如下:

  1. 把guid改回到老的guid+以上操作+若干重启机器
  2. 到gac目录下删除该dll+以上操作+若干重启机器

然后就可以了.

总结:多尝试一下,总是可以搞定的.

原文地址:https://www.cnblogs.com/sportdog/p/3064738.html