Can i find the list of the features which were installed by a shareopoint solution?
+1
A:
Unzip the wsp. From the unzipped folder you should be able to get all the features that are deployed using this wsp.
Faiz
2010-06-02 10:38:33
A:
If you are referring to lsiting the features of an installed solution I think this will do the trick. You can add an if block to filter it down to a specific solution name/id if you wish.
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"));
}
}
}
}
}
jjr2527
2010-06-02 17:32:45