gpt4 book ai didi

c# - Sharepoint 看不到新部署的功能,也不会激活它们

转载 作者:行者123 更新时间:2023-11-30 21:11:27 24 4
gpt4 key购买 nike

我一直在更新 SP2010 解决方案,该解决方案通过 BCS 将外部内容源集成到搜索中。此解决方案将功能 (featureA) 部署到服务器场范围。我将其分为两个功能,一个 (FeatureA) 部署到场范围,一个 (featureB) 部署到站点范围。

我的更新脚本是这样做的:

  • 在农场停用 FeatureA
  • 使用新的 wsp 文件(同名)更新 SPSolution
  • 在农场激活 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.

我又有点不知所措了。

最佳答案

当新文件已添加到解决方案包时,您不能使用 Update-SPSolution

来自 Update-SPSolution :

The Update-SPSolution cmdlet upgrades a deployed SharePoint solution in the farm. Use this cmdlet only if a new solution contains the same set of files and features as the deployed solution. If files and features are different, the solution must be retracted and redeployed by using the Uninstall-SPSolution and Install-SPSolution cmdlets, respectively.

有关详细信息,请参阅 Adding Features during Solution Update

关于c# - Sharepoint 看不到新部署的功能,也不会激活它们,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8065697/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com