I have created several custom web parts in a Visual Studio solution which deploys to my development environment site perfectly directly through Visual Studio. However, I also want to be able to deploy this solution to my testing/production environment which means using Powershell commands to accomplish the same result as a deploy through Visual Studio. Every guide I've found uses the same commands that I am using which seems like it works but my web parts never show up in the web part gallery. They do show up in the web part gallery through the Visual Studio deploy method so Visual Studio must be doing something else to provision them there. The steps I'm using are as follows:
-Publish the Visual Studio solution and copy/paste the resulting .wsp file to a folder in my other site's machine at C:\Deploy\
-In SharePoint Management Shell on the machine I'm deploying to:
- Add-SPSolution -LiteralPath C:\Deploy\Announcements.wsp
- Install-SPSolution -Identity Announcements.wsp -AllWebApplications -GACDeployment
- Install-SPFeature -Path Announcements_Feature1 -Force
- Enable-SPFeature -Identity Announcements_Feature1 -Url "site"
These commands all go through without error but the web parts don't show up in the web part gallery and I can't add them to my pages. I have tried uninstalling/removing the solution and add/installing again. I've made sure the feature scope is at the Site level. The -GACDeployment in the install command should register the solution as safe. The web parts are in the feature...I feel like I've tried everything and still nothing works.
Edit: I've also tried this approach on my development environment machine which is the same machine Visual Studio deploys to perfectly and still no luck.