我能找到sharepoint解决方案安装的功能列表吗?
答案 0 :(得分:1)
解压缩wsp。从解压缩的文件夹中,您应该能够获得使用此wsp部署的所有功能。
答案 1 :(得分:1)
如果您指的是使用已安装解决方案的功能,我认为这样做会有所帮助。如果您愿意,可以添加if块以将其过滤到特定的解决方案名称/ ID。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Administration;
using Microsoft.SharePoint.Deployment;
using NUnit.Framework;
namespace Tests
{
[TestFixture]
public class EnumerationTests
{
[Test]
public void EnumeratingSiteFeatures()
{
using (var site = new SPSite("http://localhost:50000"))
{
var features = site.WebApplication.Farm.FeatureDefinitions;
var solutions = site.WebApplication.Farm.Solutions;
foreach (SPFeatureDefinition feature in features)
{
var solution = solutions[feature.SolutionId];
var featureName = feature.DisplayName;
Console.WriteLine(string.Format("Solution:{1}\nFeature:{0}\n", featureName, solution != null ? solution.DisplayName ?? solution.Name : "Solution was null"));
}
}
}
}
}