我一直在更新SP2010解决方案,该解决方案通过BCS将外部内容源集成到搜索中。此解决方案将一个功能(featureA)部署到服务器场范围。我将其拆分为两个功能,一个(FeatureA)部署到服务器场范围,一个(featureB)部署到站点范围。
我的更新脚本执行此操作:
脚本在最后两步上炸弹,说
Enable-SPFeature : The Feature is either not found or not a Farm Level Feature. Use Url parameter to specify the scope of the Feature.
表示第一个(农场),
Enable-SPFeature : The Feature is not a Farm Level Feature and is not found in a Site level defined by the Url http://url-site
在第二个(网站)
这是在CI服务器上运行的测试,这意味着它也将在生产服务器上崩溃。 但是,在我的机器上部署软件包并激活这些功能,工作正常。
我已经检查过,这些功能实际上存在于SharePoint文件夹中,因此部署似乎已经不错了。我无法弄清楚为什么SharePoint无法看到它们。如果我运行Get-SPFeature,它们不在列表中。
我尝试了iisreset,但没有用。
编辑:
通过使用Install-SPFeature,我设法让SharePojnt注意到这两个功能。 但是,它仍然不会启用FeatureB,但会出现错误:
Enable-SPFeature : Attempted to perform an unauthorized operation.
我再次有点失落。
答案 0 :(得分:4)
将新文件添加到解决方案包时,您无法使用Update-SPSolution
。
Update-SPSolution cmdlet升级服务器场中的已部署SharePoint解决方案。仅当新解决方案包含与已部署解决方案相同的文件和功能集时,才使用此cmdlet。如果文件和功能不同,则必须分别使用Uninstall-SPSolution和Install-SPSolution cmdlet撤消和重新部署解决方案。
有关详细信息,请参阅Adding Features during Solution Update