现在的位置: 首页 > 综合 > 正文

Error occurred in deployment step ‘Activate Features’: Feature with Id ‘{GUID}’ is not installed in this farm, and cannot be added to this scope.

2012年04月12日 ⁄ 综合 ⁄ 共 928字 ⁄ 字号 评论关闭

笔者最近在做一个SharePoint 2010 的开发的小东西. 在VS2010里遇到了标题中的那个错误. 查了些资料(已经列在了下面), 却都没有解决我的问题.

经过一番研究, 搞清楚了问题的原因和解决方法.

 

在有多台服务器的SharePoint 2010场环境中, VS2010里编译成功后, 在project上点击右键后选Deploy, 就会报这个错误. 笔者选的是Farm Solution, 不是Sandbox Solution.

解决方法是, 在VS2010里让你的project 编译通过, 然后选择Package. 在Bin目录下找到生成的wsp文件, 上传到管理中心的solution gallery中. 在管理中心里部署solution. 就可以成功了.

 

在上传wsp到管理中心的过程中, 需要用到一个powershell命令.

add-spsolution –literalpath “d:\temp\myspsproj.wsp”

 

可能一般开发人员不会在有多台服务器的场中直接部署solution吧, anyway, 希望这篇文章对你有帮助.

呵呵, 笔者祝你开发SharePoint愉快.

 

参考资料

====================

SharePoint 2010 projects with field elements cannot be redeployed

http://support.microsoft.com/kb/2022443 

Error occurred in deployment of step ‘Activate Features’: the field with ID defined in feature was found in the current site collection or in a sub site.

http://blogs.msdn.com/b/yardman/archive/2010/07/27/error-occurred-in-deployment-of-step-activate-features-the-field-with-id-defined-in-feature-was-found-in-the-current-site-collection-or-in-a-sub-site.aspx

抱歉!评论已关闭.