SharePoint 2010 Troubleshooting: Error occurred in deployment step Activate Features
Error message
When trying to deploy a Visual web part, you got the below error message.
“Error occurred in deployment step ‘Activate Features': Feature with Id ‘<GUID>’ is not installed in this farm, and cannot be added to this scope.”
Solution: 1
The easiest resolution, which may work for other is as below.
- Retract the solution in Visual Studio 2010
- Restart Visual Studio
- Deploy the solution
But it didn't work for me.
Solution: 2
Go to the Central Administration and then to System Settings. Click on 'Manage Farm Solutions' under Farm Management
It will list down all the Farm solutions deployed .
- Click on the individual solution
- Retract the solution
- remove the solution.
After this do a fresh deployment from Visual Studio. It will work.
But this also didn't work for me.
Solution: 3
While trying Solution 2, i noticed one issue, that the same solution was deployed twice and one was successful and other was failure.
So it is clear, in our code, in two places, we have added the feature.
I have gone back to the Visual studio and investigated.
In Visual studio I am handling multiple projects in a single solution. We had a project to combine all the feature and deploy as one solution WSP file. This was creating the problem. This is getting deployed and individual project WSP files are getting deployed. So there is multiple/duplicate deployments of a same feature.
We have removed the project which we created to combine all the feature. Deployed the features as a individual solution (WSP file) then it worked.
Keep an eye on this when you are handling multiple project in Visual studio under a same solution.