SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am creating a build script that will automatically create a Test Site, Deploy all wsp to that site and activate all the features. The problem I have is how do I enumerate the feature Names or GUID's from the WSP's or from the Test site for the WSP's I have just deployed?

share|improve this question
up vote 3 down vote accepted

You have to loop through the SPFarm.FeatureDefinitions and select all the ones where the SolutionId is equal to the added Solutions ID

share|improve this answer
This is exactly what I needed! Thank you very much! – Lukasz May 29 '12 at 19:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.