I have a solution with several site/web scoped features (SP2010). Id like to deploy this solution to one specific web application. The features should only show up in the sites/webs which reside in this web application.
By adding Safe Control Entries to my solution I am able to deploy the solution to a specific web application. However, the features of my solution still show up in all other web applications.
There is a similar question on SO, see Creating a solution that deploys to selected WebApplications but copies the assembly to GAC. From the answers given, it seems that it is not possible. However the TS himself states that it is actually working (for him).
EDIT
To make things clearer, my confusion is probably best summarized by the following question:
Why is it possible to activate a feature on a web application where it has not been deployed to?
No, you cannot control the visibility of web/site scoped features to single web application. They will be either visible in all of them or none.
My first question would be why do you want a restriction like this ? A feature should be reusable component which can be activated anywhere once deployed. Note that however, the activation needs Administrator previleges.
If you really want to restrict:
– Hide it and use powershell or stsadm script to deploy.