Error occurred in deployment step ‘Activate Features’: Failed to activate feature ‘SiteDefinition1_Feature1’ (ID: b2637aff-6c72-4ec9-9a44-3f10d8e46714) at scope ‘http://…’.

I started getting this error when deploying my custom SharePoint Server 2010 site definition, which was little weird, because it was working and then it suddenly stopped. After trying a few different things, I closed down Visual Studio 2010, and left it at that, while attending to some other business. When I came back and reopened the solution, everything worked fine again, and after a “little” investigation, it turned out to be because I had deleted and recreated the site collection, which was used for debugging.