Error occured in deployment step Activate Features :Feature with id “X” is not installed in this farm ,and cannot be added to this scope
I think you have multi server farm
Basically the error happens because VS 2010 do not support features activation on multi-server farms. However ,the devil is in the details, the exact explanation is in a previous step. It turns out that VS 2010 internally implements a call to the method SPSolution.DeployLocal http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spsolution.deploylocal.aspx . That method is intended for troubleshooting purpouses of wsp files and as you can read on the MSDN documentation it performs a local deployment instead of an immediate deployment (Only to one sever of the farm) Therefore, the only solution to avoid the situation is to compile the code (build o re-build) , go to the VS 2010 top menu and select build -> package. After that a new wsp file will be created on the BIN folder of the project.
kindly go through the following URL which has complete solution for your problem
The second variant of problem is multiserver sharepoint farm (several webfrontend). In my case on dev.enviroment used 2WFE(sharepoint 2013), then deploy from VisualStudio impossble. Deploy project from PowerShell or SharepointInstaller. Debug - connect from VisualStudio.