We're currently migrating from SP 2007 to SP 2010. We were using the SmartPart web part in 2007, and have downloaded the updated SmartPart dll. I need to loop through each site collection in the farm and activate the feature (we have hundreds of site collections).
I keep getting "Feature with Id [feature GUID] is not installed in this farm, and cannot be added to this scope."
The feature is, in fact, installed, and I can activate it manually through Site Settings. Here is my code:
// Already inside the site collection
SPFeatureDefinition featureDefinition = SPFarm.Local.FeatureDefinitions["SmartParts_Feature1"];
Any insight would be greatly appreciated.