Tom*_*ald 2 c# powershell sharepoint sharepoint-2010
我一直在更新 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.
Run Code Online (Sandbox Code Playgroud)
对于第一个(农场),和
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
Run Code Online (Sandbox Code Playgroud)
在第二个(站点)
这是在 CI 服务器上的测试运行,这意味着它也会在生产服务器上崩溃。但是,在我的机器上部署包并激活功能,效果很好。
我已经检查过,这些功能实际上存在于 SharePoint 文件夹中,因此部署似乎没有问题。我不明白为什么 SharePoint 看不到它们。如果我运行 Get-SPFeature,它们不在列表中。
我试过iisreset,无济于事。
编辑:
通过使用 Install-SPFeature,我设法让 SharePojnt 注意到这两个功能。但是,它仍然不会启用 FeatureB,但会出现以下错误:
Enable-SPFeature : Attempted to perform an unauthorized operation.
Run Code Online (Sandbox Code Playgroud)
我又有点失落了。
Update-SPSolution当新文件已添加到解决方案包时,您无法使用。
Update-SPSolution cmdlet 升级服务器场中已部署的 SharePoint 解决方案。仅当新解决方案包含与部署的解决方案相同的一组文件和功能时,才使用此 cmdlet。如果文件和功能不同,则必须分别使用 Uninstall-SPSolution 和 Install-SPSolution cmdlet 收回和重新部署解决方案。
有关详细信息,请参阅在解决方案更新期间添加功能
| 归档时间: |
|
| 查看次数: |
5501 次 |
| 最近记录: |