I've created an empty SharePoint project, added a couple of webparts and modules to it but whenever I deploy the solution I get this error in Visual Studio 2010 Professional:
Error occurred in deployment step Activate Features: Failed to activate feature TestWebParts_Feature1 (ID: 79130ce4-d296-42e4-9f82-4faaee3bad50) at scope
I have no problem activating the feature on
http://dk01sv0490/sites/testpublishingportal/_layouts/ManageFeatures.aspx - the error only occurs from Visual Studio. When I check the SharePoint log I noticed these lines:
Feature Activation: Activating Feature TestWebParts_Feature1 (ID: 79130ce4-d296-42e4-9f82-4faaee3bad50) at URL
Feature Activation: The web or site was not found.
Feature Activation: Threw an exception, attempting to roll back. Feature TestWebParts_Feature1 (ID: 79130ce4-d296-42e4-9f82-4faaee3bad50). Exception: System.InvalidOperationException: Failed to activate feature TestWebParts_Feature1 (ID: 79130ce4-d296-42e4-9f82-4faaee3bad50)
at scope http://dk01sv0490/sites/testpublishingportal. at Microsoft.SharePoint.SPFeature.HandleActivateError(SPFeature featError, Int32 iRetVal, Boolean fForce)
at Microsoft.SharePoint.SPFeature.AddRowToFeaturesTable(SPFeaturePropertyCollection props, SPSite site, SPWeb web, Boolean fForce) at Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection
props, Boolean fForce)
However this worked in Visual Studio before I deleted the site collection and re-created it with the same URL but other than that I tried these steps without success:
- de- and reactivate the feature
- retract and deploy the solution
- delete and re-create the feature in Visual Studio
- reset the iis
Is there a way to see what commands Visual Studio is executing when activating a feature or another solution to this problem?