Error occurred in deployment step ‘Activate Features’

I was recently working on a solution that consisted of custom content types and forms.  I worked on it in my dev environment, made sure it was good to go, and tried to deploy it to a shaky test environment.  When deploying via PowerShell, the deployment status showed “Not Deployed” while the last operation result showed “The solution was successfully deployed”.

SolutionProperties

Everything that needed to go into the hive was where it should be but when I went to the Site Collection Features, my Feature was not there.  That test box also had Visual Studio on it so I tried deploying with Visual Studio and got the following error:

Error occurred in deployment step ‘Activate Features’: Feature with Id ‘<guid>’ is not installed in this farm, and cannot be added to this scope.

As I mentioned earlier, that test server has some issues so I checked everything; permissions, web.config, Visual Studio settings, the ULS, Job Definitions, Services, you name it.  I even created a Empty SP2013 solution with nothing in it other than a Feature.  I got the same errors and the only times that I didn’t were when I removed the Feature from the package or set the Feature’s scope to Web Application which wouldn’t help me.

Solution:  I packaged the wsp, and deployed via PowerShell using Add-SPSolution and Install-SPSolution.  This got me back to where I started where all the files were where they belonged but the Feature wasn’t available in the Site Collection Features page.

I then ran the following PowerShell command and my feature appeared in the Site Collection Features page and I was finally able to activate it.


Install-SPFeature "MyFeature"